显示/隐藏 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章