Process process
=
new
Process();
process.StartInfo.UseShellExecute = false ;
process.StartInfo.RedirectStandardOutput = true ;
process.StartInfo.FileName = " F:/netprojects/ConsoleApplication4/bin/Debug/ConsoleApplication4.exe " ;
process.Start();
StreamReader sr = ocess.StandardOutput;
string strInfo;
while ((strInfo = sr.ReadLine()) != null ) {
this.richTextBox1.AppendText(strInfo);
this.richTextBox1.Refresh();
}
process.StartInfo.UseShellExecute = false ;
process.StartInfo.RedirectStandardOutput = true ;
process.StartInfo.FileName = " F:/netprojects/ConsoleApplication4/bin/Debug/ConsoleApplication4.exe " ;
process.Start();
StreamReader sr = ocess.StandardOutput;
string strInfo;
while ((strInfo = sr.ReadLine()) != null ) {
this.richTextBox1.AppendText(strInfo);
this.richTextBox1.Refresh();
}
线程处理这块的代码略....