Hide the Front Panel of the Main VI When Loading a SubVI

Updated Mar 8, 2022



  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

I have a main VI that calls a sub VI. I want the Front Panel of the calling VI to be hidden/invisible when the sub VI Front Panel is visible. How can I do this?

Probably the most direct way to do this is to make the front panel of the main VI become invisible when the subVI is running. In order to do this programmatically, you need a VI reference to the main VI and two property nodes. First, you need to set the Front Panel Window >> Run VI Transparently property to TRUE. You can also do this by going to File >> VI Properties >> Window Appearance >> Customize... >> Window runs transparently and checking that option. This will enable you to change the opaqueness of the VI. Next, you need to set the Front Panel Window >> Transparency property to 100%. This will cause the main VI's front panel to become invisible.

Note: You should design your code in such a way as to have the main front panel invisible during execution. Don't forget to restore the main front panel to full opacity (0% transparency) upon completion of the subVI execution.

You can call these properties in either the main VI itself or in the subVI that is in question. Either case will work, but you will need to remain committed to the case that you choose. Refer to the NI Community Example for a full example and explanation of this behavior.

Alternative Method:
The Front Panel of the calling VI can be hidden when the subVI Front Panel becomes visible by following this procedure:
  1. Open the subVI front panel and maximize it. 
  2. Select File >> VI Properties.  
  3. Select the Window Size category and click Set to current window size. This sets the maximized (full size) window as the minimum size for the front panel.
  4. Select the Window Appearance category.
  5. Click on the Customize tab and choose Modal as the Window Behavior and check Show Front Panel When Called.
  6. Click OK and save the VI.  
  7. Run the main VI. When the sub VI is called, the subVI front panel is visible and the main VI Front Panel is hidden behind it. The Minimize button is disabled since the Modal behavior was chosen. Also, if you try to resize the window, the window does not change its size since the minimum panel size was chosen as the full-screen dimensions. Hence, the main VI front panel remains hidden once the subVI front panel is called until the sub VI is closed.