LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How To Hide System Window

Hello all,
 
I have an application that needs to send a command using the Labwindows/CVI 'system' window (it will be sending a 'net use' command to automatically map a network drive).  When I do this the DOS command window appears for a couple of seconds.  I would like to hide the DOS command window so that it does not appear, but I have been unable to find a way to do this.  I have tried using 'SetStdioWindowVisibility' but this doesnt seem to work.  Any suggestions on how to hide the DOS command window, or of an alternative method for mapping the network drive?
 
Using:
Labwindows/CVI 7.0
Windows XP
0 Kudos
Message 1 of 4
(3,440 Views)
You could try altering the c:\windows\_default.pif file properties (on the Program tab) to Run Minimised, instead of Normal Window.
 
JR
0 Kudos
Message 2 of 4
(3,434 Views)

Altering the _default.pif file didn't seem to have any effect on minimizing the window.  Perhaps I am doing something wrong?  I right clicked on the file and  on the 'Program' tab I set 'Run' to 'Minimized'.

If this is the correct way to do it, any other suggestions?

0 Kudos
Message 3 of 4
(3,428 Views)

I haven't tried it myself, but according to CVI help the system() function call should have picked up the settings in the .pif file. The CVI help for LaunchExecutableEx() suggests that you can pass a parameter (LE_HIDE) to control the state of the window for the external application - maybe you will have more luck with this function instead of system().

JR

Message 4 of 4
(3,414 Views)