0

I have written a program that reads some information from a file and after processing it, writes it on another file.

However, I don't wanna to see any window appear on my monitor when I open my program, even for a moment. Is there any way to make it invisible?

Shahbaz
  • 44,690
  • 18
  • 114
  • 177
arman radan
  • 192
  • 11
  • Seems windows; and no you can't. –  Jul 08 '12 at 12:23
  • 2
    You have to tell us your OS as well as compiler, IDE etc. However, if it is in Windows and you are using Visual C++, you are probably creating a "console application", which of course opens a console. If you create a windows application, you can choose not to open a window. – Shahbaz Jul 08 '12 at 12:26
  • 1
    @H2CO3, why is that? I bet I can, why wouldn't he be able? – unkulunkulu Jul 08 '12 at 12:26
  • duplicate of http://stackoverflow.com/questions/224225/create-an-application-without-a-window – Nahum Jul 08 '12 at 12:27
  • It's probably called Windows, because it has got windows popping up, doesn't it? ;) (*edit*: Sorry for that little joke. For a serious answer see below those of Christian and Rango) – Torbjörn Jul 08 '12 at 12:37
  • Marcelo Cantos : windows – arman radan Jul 08 '12 at 13:02

2 Answers2

3

If you're talking about Windows, then what exactly are you seeing? A console window popping up? That happens automatically if you run a console program via the desktop GUI, because a console program is supposed to have a console.

Simply make your application a GUI application... and don't create any windows.

Christian Stieber
  • 9,706
  • 22
  • 21
1

You can simply create a Win32 Application.

#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
    // do whatever you want
    return 0;
}
Rango
  • 1,047
  • 6
  • 5