In the code below DayTicker is started by
Process test.exe takes about 2 min to complete. And after that time textBox is updated with the text: "TEST" and test.exe output.
But text: "TEST" should appear before the execution of the process, not after proccess is ended.
Please help.
Code:
timer1.Tick += new EventHandler(DayTicker);
Code:
void DayTicker(object sender, EventArgs e)
{
timer1.Stop()
richTextBox1.Text += "\nTESTTTTTTT\n";
myProcess(0, 0, 0);
CheckTheOutput();
Code:
public void myProcess(int first, int second, int third)
{
Process proc = new Process();
proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.FileName = "test.exe";
proc.Start();
StreamReader myStreamReader = proc.StandardOutput;
OutputLog = myStreamReader.ReadToEnd();
richTextBox1.Text += OutputLog;
}
Process test.exe takes about 2 min to complete. And after that time textBox is updated with the text: "TEST" and test.exe output.
But text: "TEST" should appear before the execution of the process, not after proccess is ended.
Please help.