LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Close Standard IO Window.

How do you get rid of this widow?

When I create a Release Executable I do not want this window, period.

I only want it for debugging.

 

SetStdioWindowVisibility (0);
Does not work.

 

Thanks.

0 Kudos
Message 1 of 6
(4,405 Views)

Why do you have the stdio window open?

Have you looked at using DebugPrintf()?

 

Here's some help from DebugPrintf()

 

Similar to the ANSI C printf function, but writes output to the LabWindows/CVI Debug Output Window, when LabWindows/CVI is debugging the program. If the program is not being debugged, no output occurs.

 

 

In the CVI environment, you need to go to Window >>  Debug Output   to display the info printed by DebugPrintf().

Message Edited by Al S on 09-03-2009 05:09 PM
Message Edited by Al S on 09-03-2009 05:09 PM
0 Kudos
Message 2 of 6
(4,399 Views)

Some files are legacy with printf()s.

I was hoping not to have to touch those files for every occurance of printf(), but if there is no other way then I may do the DebugPrintf().

 

Thanks.

0 Kudos
Message 3 of 6
(4,394 Views)

I think the problem you're seeing is that the next printf() statement will display the stdio window, even if you hid it with SetStdioWindowVisibility (0);

SetStdioWindowVisibility works, but the next time you call printf(), it gets displayed anyway.

 

Another thing you can try is to position the stdio window off the screen.  It will think it's being displayed, but you won't see it.

Try this:

 

SetStdioWindowPosition (-1600, -1600);

 

Or even fancier

 

if (BeingDebuggedByCVI ())

   SetStdioWindowPosition (0, 0);

else

   SetStdioWindowPosition (-1600, -1600);

 

Message Edited by Al S on 09-03-2009 05:59 PM
0 Kudos
Message 4 of 6
(4,387 Views)

I will try moving it off screen and let you know how that works.

 

Thanks.

0 Kudos
Message 5 of 6
(4,379 Views)

have you tried to globally redefine DebugPrintf to an empty instruction:

 

#define DebugPrintf(args)

 

if this definition (or something similar, i am not sure right now about the arguments) is included before any of your legacy file, then calls to DebugPrintf() will do nothing, and the stdio window will not re-appear.

0 Kudos
Message 6 of 6
(4,359 Views)