I have a set of libraries that do processing output to Console.Out, and
Console.Error.
How do I direct that output to a Textbox on a Windows form in CSharp?
Thanks in advance!
- Nevyn
John M Deal - 16 Nov 2004 19:08 GMT
For this you can route the In, Out, and Error objects used by the
console to your own objects. To do this simply use the Console.SetIn,
Console.SetOut, and Console.SetError equal to your object. SetIn will
accept a text reader while SetOut and SetError take text writers. Once
you've captured the output you can do what you'd like with it. Hope that
helps.
Have A Better One!
John M Deal, MCP
Necessity Software
> I have a set of libraries that do processing output to Console.Out, and
> Console.Error.
[quoted text clipped - 4 lines]
>
> - Nevyn
William Stacey [MVP] - 17 Nov 2004 00:50 GMT
Just a note. The std output can and will stall your process if the std out
fills the stdout stream - which is not a lot of output (maybe a screen
full). So you may need a seperate thread to read process.stdout into your
own output stream until process done.

Signature
William Stacey, MVP
http://mvp.support.microsoft.com
> I have a set of libraries that do processing output to Console.Out, and
> Console.Error.
[quoted text clipped - 4 lines]
>
> - Nevyn