我有这样的代码:C#隐藏,背景,processinfo
ProcessStartInfo PSI = new ProcessStartInfo("cmd.exe");
PSI.CreateNoWindow = true;
PSI.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
PSI.RedirectStandardInput = true;
PSI.RedirectStandardOutput = true;
PSI.RedirectStandardError = true;
PSI.UseShellExecute = true;
Process p = Process.Start(PSI);
问题是,当我建立它,在命令提示符下仍然出现。我怎样才能隐藏它?谢谢!
你的代码是有帮助的。但是我有问题http://stackoverflow.com/q/6501605/817564 – Lufthansa
您是否将项目类型设置为“Windows应用程序”而不是“控制台应用程序”?这应该隐藏窗口。 –