How to capture console app output?

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
 
J

Jon Skeet [C# MVP]

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.
 
J

John

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top