LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Making a front panel always on top

Solved!
Go to solution

Greetings everyone. As title says, I am working on an application that is meant to lock down operation until a responsible shows up and inputs a password. As such, I would like the lockdown screen to always take foreground priority until closed.

 

I followed the steps detailed on this article:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PA7NSAW&l=en-CA

 

However, I have the problem described at the bottom: "IMPORTANT NOTE: In some systems users have reported the following glitch when using this method: the Front Panel is not popping up above all desktop window, only the icon is flashing on the taskbar. If you are experiencing this issue please navigate to this guide to achieve the same goal with a different, batch file method"

 

However, I have came up empty handed when searching for the aluded batch file method. Is there a simple way of doing this?

 

My OS is Win7 and my LV version is 2019.

0 Kudos
Message 1 of 9
(1,999 Views)

The "Bring Window Forward" routine worked "as advertised" for me.  I didn't test it exhaustively, but if I clicked on other open windows on my desktop that were "underneath" this routine, within 3 seconds it appeared again "on top".

 

One difference is that I'm running Window 10 (and LabVIEW 2019), not Windows 7.  I could imagine that there may be some subtle differences between the Library calls to manage Windows between Windows 7 and Windows 10.  Can you try your routine on a Windows 10 machine?

 

Bob Schor

0 Kudos
Message 2 of 9
(1,993 Views)

Tried it on a Win10 system, same behaviour. I can click on other windows and work with them no problem, the front panel just blinks in yellow.

0 Kudos
Message 3 of 9
(1,966 Views)
Solution
Accepted by topic author Daikataro

See if this works.

 

Edit: there is also this toolkit which has a bunch of Windows API stuff, including "Move Window to Top.vi" (which actually uses a different Windows API call than what I uploaded) and "Make Window Always on Top.vi" which I have never tried. Bunch of other cool stuff in it too.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 4 of 9
(1,960 Views)

@FireFist-Redhawk wrote:

See if this works.

 


The attached VI showed the same behaviour as the NI provided one. However...

 


Edit: there is also this toolkit which has a bunch of Windows API stuff, including "Move Window to Top.vi" (which actually uses a different Windows API call than what I uploaded) and "Make Window Always on Top.vi" which I have never tried. Bunch of other cool stuff in it too.


This one absolutely did the trick. Kind of too good actually, since I fiddled with the VI without saving, and upon closing, I was unable to click the save changes dialog, as the front VI was always on top. That toolkit looks interesting; definitely something I will keep around for future VIs.

 

Thanks a lot! Now back to the interface.

0 Kudos
Message 5 of 9
(1,940 Views)

I'm curious as to why you don't make the vi modal as this appears to be the behavior that you are describing.

0 Kudos
Message 6 of 9
(1,934 Views)

Because the modal behaviour only sets the front panel always on top of other VIs. I want this particular front panel to be in front of every Windows application; i.e. the system is unuseable until a technician shows up.

 

We've had our fair deal of ignored warnings...

0 Kudos
Message 7 of 9
(1,926 Views)

Got it. I had missed that part of it. 

 

As a side note, would it be possible to have it send you an alert when a warning occurs and when it is cleared? I know that it may not be on the network to have email access, but it was a thought. It would at least give you a record if a warning has not been cleared.

0 Kudos
Message 8 of 9
(1,865 Views)

Oh trust me, we WILL know when the warning shows up. This is production equipment, so the second they cannot continue, they will instantly open a ticket and request support.

 

We might add an alert in the future, but right now, team leaders do that very well.

0 Kudos
Message 9 of 9
(1,856 Views)