Can I Hide the Front Panel of the Main VI When Loading a Sub VI Front Panel in LabVIEW?

Updated Jan 2, 2018

Reported In

Software

  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

Issue Details

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?

Solution

Probably the most direct way to do this is to cause the front panel of the main VI to 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.  This will enable you to change the opaqueness of the VI.  Next you need to set the Front Panel Window»Transparency to 100%.  This will cause the main VI's front panel to become invisible.
 

Additional Information

You should architect 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 linked below for a full example and explanation of this behavior.

Alternative Method:
The Front Panel of the calling VI can be hidden when the sub VI Front Panel becomes visible by following this procedure:
 
  1. Open the sub VI Front Panel and maximize it. 

  • Select File»VI Properties.

  • 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.

  • Select the Window Appearance category.

  • Click on the Customize tab and choose Modal as the Window Behavior and check Show Front Panel When Called.

  • Click OK and save the VI.

  • 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 sub VI Front Panel is called until the sub VI is closed.

WAS THIS ARTICLE HELPFUL?

Not Helpful