10-01-2010 09:12 AM
How can we redirect stdout to a textbox?
10-03-2010 03:02 PM
It's very hard to do. You have to redirect to pointers from the commandline environment to your application and it's very tedious and difficult to do smoothly. I personally spool the oiytput to a file and just read the file back and update the display from that.
For example, if you want to display the directory output in your textbox do:
dir >tempfile.txt
this will append to the existing file. When the command returns read the file content, delete and repeate etc, or use:
dir >>tempfile.txt
to overwrite any existing file with the new content.
If you want to try redirecting the pointers here is a complete article I found on the subject:
http://support.microsoft.com/kb/190351
I gaveup on it after trying for half a day.