Show/Hide the console window of a C# console application

Timwi picture Timwi · Aug 26, 2010 · Viewed 215.5k times · Source

I googled around for information on how to hide one’s own console window. Amazingly, the only solutions I could find were hacky solutions that involved FindWindow() to find the console window by its title. I dug a bit deeper into the Windows API and found that there is a much better and easier way, so I wanted to post it here for others to find.

How do you hide (and show) the console window associated with my own C# console application?

Answer

Fahad picture Fahad · May 1, 2011

Just go to the application's Properties and change the Output type from Console Application to Windows Application.