c# start new process in window mode

你说的曾经没有我的故事 提交于 2020-12-06 07:51:32

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!