且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何运行与隐藏的控制台的C#控制台应用程序

更新时间:2022-01-25 05:52:36

如果您使用的是的ProcessStartInfo 类,你可以将窗口样式设置为隐藏。

if you are using the ProcessStartInfo class you can set the window style to hidden.

System.Diagnostics.ProcessStartInfo start =
      new System.Diagnostics.ProcessStartInfo();     
start.FileName = dir + @"\Myprocesstostart.exe";
start.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;