Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

supagu

hide console window

This topic is 5584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im using visual studio 6/.net and was wondering how to hide the console window when your exe loads up, ive done this before but have forgotten :-/ thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
console or win32 app:

#pragma comment(linker, "/entry:\"mainCRTStartup\" /subsystem:\"windows\""

of course you could do this the clean way too: in project settings, on the link tab...

Share this post


Link to post
Share on other sites
From inside a console using program:

HWND hwnd = GetConsoleWindow();
ShowWindow(hwnd,SW_HIDE);

Note that GetConsoleWindow is 2K/XP only - well NT4 too except it''s undocumented for NT4.





"It is always a simple matter to drag the people along, whether it is a democracy, or a fascist dictatorship, or a parliament, or a communist dictatorship. Voice or no voice, the people can always be brought to the bidding of their leaders. That is easy. All you have to tell them is that they are being attacked and denounce the peacemakers for lack of patriotism and exposing the country to danger. It works the same in any country."
Hermann Goering

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!