I wanted to launch a script from a Windows Form application and display the standard output in a text box as the process was running. Surely you're not surprised to learn that multithreading is involved. It turns out you'll have at least four threads running to do this simple task. To keep things simple and sane, I've reused code from other another source, so I must first give credit to the MSDN article "Give Your .NET-based Application a Fast and Responsive UI with Multiple Threads" by I.D. Griffiths. I highly suggest reading this article for more background on multithreading in Windows Forms applications. Thanks also to Chad Christensen for his suggestions in using a RichTextBox.
Comments