10-18-2021 12:18 PM
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.
Solved! Go to Solution.
10-18-2021 12:41 PM
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
10-18-2021 01:08 PM
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.
10-18-2021 01:27 PM - edited 10-18-2021 01:33 PM
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.
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.
10-18-2021 03:17 PM
@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.
10-18-2021 03:31 PM
I'm curious as to why you don't make the vi modal as this appears to be the behavior that you are describing.
10-18-2021 04:12 PM
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...
10-19-2021 07:22 AM
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.
10-19-2021 08:39 AM
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.