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

前端 未结 8 2224
走了就别回头了
走了就别回头了 2020-11-22 10:13

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()

8条回答
  •  天涯浪人
    2020-11-22 10:58

    See my post here:

    Show Console in Windows Application

    You can make a Windows application (with or without the window) and show the console as desired. Using this method the console window never appears unless you explicitly show it. I use it for dual-mode applications that I want to run in either console or gui mode depending on how they are opened.

提交回复
热议问题