Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Data Binding / November 2004

Tip: Looking for answers? Try searching our database.

Directing Console.Out and Console.Error to a Textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nevyn Twyll - 16 Nov 2004 18:59 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.