Hide Command Window in C# Console Application...
Sat, 05 Oct 2013 23:22:53 GMT 291 views
Sometimes, you do not want the console window to show up. Here is a really simple method to hide the command window in console application:
Change the output type from Console Application to Windows Application.
This can be done under Project -> Properties –> Application in Visual Studio IDE:
在实际应用中,出于安全等因素的考虑,有时需要隐藏C#开发的控制台应用程序的窗口,让控制台程序在后台静默执行,比如定时执行的任务等。
这里和大家分享一个非常简洁高效的实现方式:
在Visual Studio中,打开“项目”—> "属性" ,点击左侧的“应用程序”,将右侧应用程序的输出类型,选择为 “Windows程序”,确定。
重新编译生成项目,运行一下试试 :)
Subscribe:
RSS FeedShare:
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。