How to capture console app output?

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

In Win App, I used Process class to start a new console appliaction, is it
possible to capture the console output and display them in a textbox?

Thanks very much!

John
 
John said:
In Win App, I used Process class to start a new console appliaction, is it
possible to capture the console output and display them in a textbox?

Yes - you need to redirect the output to a stream. See the
RedirectStandardOutput and RedirectStandardError properties of
ProcessStartInfo.
 
Perfect! Thanks very very much!!!

John

Jon Skeet said:
Yes - you need to redirect the output to a stream. See the
RedirectStandardOutput and RedirectStandardError properties of
ProcessStartInfo.
 
Back
Top