Geeks With Blogs

Tangible Thoughts SharePoint, MOSS? and all the other questions

A colleague of mine recently showed me that if you Console.Out.WriteLine in a windows forms app and if you happen  to run the app in debug mode through the VS.NET the output actually gets displayed on the Output Window in IDE. That I didnt know, and was momentarily fascinated.

Intrigued by that, did a bit of hunting around and came across this MSDN Magazine article.

That article is a pretty good read. Apparently the standard output, standard input and standard error streams in app can be redirected. Which is what happens when you Console.Out in a windows forms App.

The article also shows a couple of neat examples where console output is piped to another C# console app which got me started on sorting out a requirement I have had for a long time.

I think the default command window is great, but copying and pasting is a bit of a hassle, and yes you can redirect the output to a file but then you dont have a live display of progress of whatever script is running.

So why not pipe the output to a Windows forms viewer that would let you copy with ease, and also has live update?

Like this?


To me this is going to pretty darn usefull when you have humongous scripts running, like smigrate backups, nant builds etc.

Source and Binary hosted at ProjectDistributor.

Posted on Friday, September 30, 2005 4:35 PM .NET | Back to top

Comments on this post: Standard Output, Windows Forms and OutputViewer

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Tariq | Powered by: