I’ve tried to read up on a few articles about this, but some of them were over my head at the moment.
I run a program that re-caches some SQL data from an external source. I call this from a WinForm application which manipulates the aforementioned data.
While the Console app is running, I lay over the controls with a panel (with a textbox on it) and try to capture the Console app’s stdout into the textbox. It “works”, but has some issues with repeating lines and missing lines. Reading the stream after the process ends works fine, but I’m having issues with real-time.
It worked well for me in asynchronous way. Unfortunately I’m not so familiar with .net to write code from my memory…
Upd:
Spent a couple of minutes and found the page in MSDN. Use Process.BeginOutputReadLine Method, here is the description of the function and a sample of its usage.