问题
My c# application starting console .exe file.
process is starting correctly its visible in Task manager but process running without window.
How i can run console applications in window ?
Code:
p_info.UseShellExecute = true;
p_info.CreateNoWindow = false;
p_info.WindowStyle = ProcessWindowStyle.Normal;
Process.Start(p_info);
回答1:
here a sample which launch a visible console application from another application
ProcessStartInfo p_info = new ProcessStartInfo();
p_info.UseShellExecute = true;
p_info.CreateNoWindow = false;
p_info.WindowStyle = ProcessWindowStyle.Normal;
p_info.FileName = @"archi\ConsoleApplicationtest\ConsoleApplicationtest\bin\Debug\ConsoleApplicationtest.exe";
Process.Start(p_info);
Best regard
来源:https://stackoverflow.com/questions/11593572/c-sharp-start-new-process-in-window-mode