How to Bring the Front Panel in Front of All Desktop Windows? -Batch File Method

Updated Apr 30, 2021

Environment

Software

  • LabVIEW Professional
  • LabVIEW Base
  • LabVIEW Full

Operating System

  • Windows

This article will guide you through the process of setting the Front Panel window in front of all desktop windows. The Front Panel property IsFrontmost, which is showed in the image below, sets the Front Panel only in front of all LabVIEW windows and it has no use in itself when you have multiple other destop applications open. 


 
IsFrontmost.JPG

The following method will help you overcome this problem:
 

You can use the attached batch file which is sending keystrokes to LabVIEW. Sending an empty keystroke makes LabVIEW the active application similarily as selecting one of the windows manually with the mouse. If you have multiple LabVIEW windows open the Property Node method mentioned above can make sure the desired Front Panel will be on top of all desktop applications. Please follow the listed steps: 

 
  1. Download the attached VI – this VI is bringing it’s Front Panel in front of all applications in Windows 10 every 3 seconds
  2. Download the attached sendkeys.bat batch file to the same directory as the VI
  3. Open the block diagram
  4. Observe the sendkeys.bat file is called by the System Exec.vi , the first argument in the quotation mark is the target application, the second is left emtpy because we are sending an empty keystroke just to activate LabVIEW
System Exec.JPG
  1. Observe the Property Node mentioned before which makes sure the desired FrontPanel opens when you have multiple LabVIEW VI-s open:
FRONTMOST.jpg
  1. Run the VI
  2. Open non-LabVIEW applications such as browser, File Explorer, etc. Observe every three seconds the selected LabVIEW Front Panel pops up above any application



 
 

Attachments