Re: How to capture console app output?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 02/18/04


Date: Wed, 18 Feb 2004 18:46:35 -0000

John <john-nospam@pursca.com> wrote:
> 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.

-- 
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too


Relevant Pages

  • Re: How to capture console app output?
    ... >> In Win App, I used Process class to start a new console appliaction, is ... >> possible to capture the console output and display them in a textbox? ... > Yes - you need to redirect the output to a stream. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Running Command Line statements
    ... > This will redirect the console output into a Windows Forms application. ... If he redirects the DOS programs output to a stream, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Running Command Line statements
    ... >> This will redirect the console output into a Windows Forms application. ... > command line may require." ... > appropriate answer back to the DOS programs standard input? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Embeding external application onto a windows form
    ... As the other poster suggested you can redirect the console output and input, but AFAIK you can do that only for a processes that your application starts. ... A mindless worker is a happy worker. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Compile Options
    ... a customer "Stream" object and redirect our winform ... application's Console output to the "GUIConsole" is considerable. ...
    (microsoft.public.dotnet.languages.csharp)