Hi, when I start from application my external program (execution takes 4 min) it wait until my external program exit, then i see my application window with textbox with the external program output. How to make textbox update in real time. source:
---------
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("text.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
myProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcessStartInfo.CreateNoWindow = true;
myProcess.Start();
StreamReader myStreamReader = myProcess.StandardOutput;
// Read the standard output of the spawned process.
string myString = myStreamReader.ReadToEnd();
Console.WriteLine(myString);
richTextBox1.Text = myString;
myProcess.Close();
-----------------------
thx for help
---------
Process myProcess = new Process();
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("text.exe");
myProcessStartInfo.UseShellExecute = false;
myProcessStartInfo.RedirectStandardOutput = true;
myProcess.StartInfo = myProcessStartInfo;
myProcessStartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcessStartInfo.CreateNoWindow = true;
myProcess.Start();
StreamReader myStreamReader = myProcess.StandardOutput;
// Read the standard output of the spawned process.
string myString = myStreamReader.ReadToEnd();
Console.WriteLine(myString);
richTextBox1.Text = myString;
myProcess.Close();
-----------------------
thx for help