LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

re-directing stdout to a text box

How can we redirect stdout to a textbox?

0 Kudos
Message 1 of 2
(3,050 Views)

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.

Jattie van der Linde
Engineering Manager, Software & Automation
TEL Magnetic Solutions Ltd
Message 2 of 2
(3,020 Views)