Forcing a VI Front Panel to Stay in Front of Other Windows

Updated Aug 13, 2024

Environment

Software

  • LabVIEW Full
  • LabVIEW Professional

How can I force a VI or SubVI front panel to stay at the front of all windows so that it does not disappear if user clicks on any other window?

There are various methods with which you can achieve this.

  • You can easily force a VI to stay at the front by using the VI Properties. Completing these steps will keep the front panel on top of all other LabVIEW windows until you close the window or open another modal window. You cannot interact with other windows while a modal window is open. Most dialog boxes in LabVIEW are modal windows, such as the Options dialog window.
    1. Select File >> VI Properties on the front panel of the VI you want to force to stay at the front.
    2. Select Window Appearance from the drop-down menu.
    3. Click Customize.
    4. Select the Modal radio box under Window Behavior. 
  • If you want the front panel to appear when invoked from a higher-level VI without setting the window as modal, simply check the Show front panel when called option.
Window settings.png
  • You can also do this by right-clicking on the SubVI in your top level VI. From the shortcut menu you can then choose SubVI Node Setup...  and then place a tick next to Show front panel when called as demonstrated below.
 Window.png
  • In order to do this programmatically, perform the following steps:
    1. From the function palette, place Programming»File I/O»File Constants»Current VI's Path.
    2. Place Programming»Application Control»Open VI Reference.
    3. Wire the Current VI's Path to the VI path input on the Open VI Reference VI.
    4. Place Programming»Application Control»Property Node and wire the Open VI Reference into the Reference input.
    5. On the Property Node, select Front Panel Window»IsFrontmost as the property.
    6. Right click on the Property Node and select Change All To Write.
    7. Wire a True Constant to the FP.IsFrontmost input.
  • The Show Front Panel On Call Property Node will create the same effect as well.