本文介绍了运行启动程序的dos命令,并使程序保持打开状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行以下代码,

string m_file= "c:\program\program.exe" ;// runs a program
Process myProcess = new Process();
myProcess.StartInfo.FileName = @programtextBox.Text.Trim();
myProcess.StartInfo.Arguments = m_file;

String m_arguments = myProcess.StartInfo.Arguments.ToString().Trim();

myProcess.Start();

工作正常,除了我需要程序保持打开状态才能启动此命令.

It works fine except I need the program to stay open that this command starts. But it closes while it's in the process of starting.

推荐答案

迈克尔·泰勒
http://blogs.msmvps.com/p3net

Michael Taylor
http://blogs.msmvps.com/p3net


这篇关于运行启动程序的dos命令,并使程序保持打开状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 17:12
查看更多