Programmatically Maximize My Front Panel to The Forefront of a Specific Monitor

Updated Aug 17, 2023



  • LabVIEW

Operating System

  • Windows

How can I make my front panel appear on a specific monitor, on top of all my other open windows?

This can be achieved by making use of the VI property nodes.
  1. Create a property node and expand it so that three properties can be specified. Then as properties are going to be set, right click the property node and select Change all to write.
  1. Next set the class of the property node to VI by right clicking on the property node and selecting Select Class»VI Server»VI»VI
  1. Find the property that specifies the monitor that the front panel will appear on. This property is called FP.Monitor and can be selected by clicking on one of the undefined properties and selecting Front Panel Window»Monitor. This property allows you to specify the monitor. Wiring a constant of 1 would select the primary monitor, 2 would select the secondary monitor, etc
  1. Find the property that defines the state of the front panel (Maximized, minimized, etc). This property is called FP.State, and can be found by clicking on the second undefined property and selecting Front Panel Window»State.
  1. By right clicking the input for this property and clicking create constant, an enum will be created that allows you options such as maximizing and minimizing the front panel.
  1. Find the property that allows you to bring your front panel to the front of the screen, FP.IsFrontmost. Do this by clicking on the last unassigned property and selecting Front Panel Window»Is Frontmost.

You will now have the three properties FP.Monitor, FP.State and FP.IsFrontmost on your property node, and you can use these to set the appropriate properties of your front panel when you run the program.
For example, the image below shows the property node set up to maximize the front panel on the secondary monitor and bring it to the front of the screen.