顯示/隱藏 C# 控制檯應用程序的控制檯窗口 - Show/Hide the console window of a C# console application

問題:

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 .令人驚訝的是,我能找到的唯一解決方案是涉及FindWindow()通過其標題查找控制檯窗口hacky解決方案。 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.我更深入地研究了 Windows API,發現有一種更好、更簡單的方法,所以我想把它貼在這裏供其他人找到。

How do you hide (and show) the console window associated with my own C# console application?如何隱藏(和顯示)與我自己的 C# 控制檯應用程序關聯的控制檯窗口?


解決方案:

參考一: https://stackoom.com/question/Ez8t
參考二: Show/Hide the console window of a C# console application
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章