To hide the application's front panel window and remove any taskbar icons when running an executable, you will need to edit the VI from which the executable was built and then rebuild it. To make the necessary changes, follow these steps:For LabVIEW 7.1 and later:
- Hiding the front panel window:
- Open the top-level VI that will be built into the executable.
- At the beginning of the top-level VI, get the current VI's file path using the
Current VI's Path VI located in Functions Palette»Programming»File I/O»File Constants subpalette.
- Open a reference to the top-level VI using the
Open VI Reference VI, located in Functions Palette»Programming»Application Control.
- Connect the path output wire from
Current VI's Path to the vi path input of
Open VI Reference.
- Connect the vi reference output of
Open VI Reference to the reference input terminal of a
Invoke Node VI, located in the Functions Palette»Programming»Application Control subpalette.
- Click Method on the
Invoke Node. Select Front Panel in the drop down menu that appears, then select Open.
- Create a constant on the State parameter, then select Hidden.
- Close the reference to the VI using the
Close Reference VI, located in the Functions»Programming»Application Control subpalette. Your block diagram should now look like this:
- After saving your VI, rebuild your executable.
- Hiding the Windows Taskbar icon:
- After building the top-level VI into an executable, open its corresponding .ini file. The file should be in the same directory where the executable was built. In LabVIEW 7.1 and previous, LabVIEW does not automatically create an .ini file for you upon building of the executable. Running the VI once will create this .ini file automatically (it will be empty).
- Verify that the top line of the .ini file is Application.exe where Application.exe is the name of your executable file.
HideRootWindow = True to the .ini file. This will hide the Windows Taskbar Entry for the executable.
- Finally, make sure the modified .ini file is placed in the same directory as the executable when the stand-alone application is taken to the target machine.
: In LabVIEW 8.0, the HideRootWindow .ini tag discussed above does not work. This was fixed in LabVIEW 8.0.1.For LabVIEW 7.0:
Follow the procedure described above with one exception. You will need to replace the Invoke Node function with a Property Node, located in the Functions»All Functions»Application Control
subpalette. After you have wired the VI reference from the Open VI Reference function to the Property Node you will be able to select the Front Panel Window: State
property. Finally, create a constant to set it to Hidden
As mentioned in the Issue Details section, this method is only recommended for executables that run as background processes and don't require user input. If you need to have any user input through a LabVIEW front panel control or indicator, this method is not recommended because the front panel that contains the controls and indicators will be hidden.
It is important to include a way of closing the program once it is done executing, since you will not be able to access the front panel. One way to do this is to call the Quit LabVIEW function from within your executable. Otherwise, you will need close the executable from Windows Task Manager or close the application programmatically from another VI.
The proposed method will hide the front panel of the VI or executable once it is loaded. However, you may notice the front panel being loaded for a split-second before the hiding process is enabled.