I start a Console Application via ProcessStartInfo and process.Start(). I want to hide the black window. Here\'s my code:
string output = \"\";
//Setup the
Try
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
Try This:
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
The final answer is
ProcessStartInfo psi = new ProcessStartInfo();
psi.FileName = ....
psi.RedirectStandardInput = true;
psi.RedirectStandardOutput = false;
psi.Arguments =...
psi.UseShellExecute = false;
psi.CreateNoWindow = true; // <- key line
Process p = new Process();
....
p.StartInfo.CreateNoWindow = true;
p.Start();