Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide Console Window in C# Console Application

The thing is, I really don't want the console window to show up, but the solution should be running. My point here is, I want to keep the application running in the background, without any window coming up.

How can I do that?

like image 804
SOF User Avatar asked Oct 04 '10 08:10

SOF User


People also ask

How do I hide the console in Windows?

"SW_HIDE" hides the window, while "SW_SHOW" shows the window.


2 Answers

Change the output type from Console Application to Windows Application. This can be done under Project -> Properties -> Application in Visual Studio:

alt text

like image 62
Dirk Vollmar Avatar answered Nov 16 '22 01:11

Dirk Vollmar


Change your application type to a windows application. Your code will still run, but it will have no console window, nor standard windows window unless you create one.

like image 32
Sekhat Avatar answered Nov 16 '22 01:11

Sekhat