Author: oli.bates@hotmail.com | Posted on: 7/14/2008 1:58:09 PM | Views : 553

 Hi everyone,
I am trying to redirect the output of a process to a TextBox control. The idea is that when a user clicks a button, the process is started. But, my problem is with redirecting the output back to the TextBox. I am not really sure how to go about this. I thought I could do a loop like this:
            while (!proc.HasExited)
            {
                while (!proc.StandardOutput.EndOfStream)
                {
                   TextBox1.Text = proc.StandardOutput.ReadLine();
                }
   ...

Go to the complete details ...