From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-11-2011 04:39 AM
I'm using a slightly modified version of the example LabView Simple Operator Interface vi. I use this for the user to select which test sequence to run.
The problem I have is that several of the NI standard pop-up windows keep losing focus when they get displayed: the 'Enter UUT serial number', test passed/failed/terminated window and Save_As for printing test reports, are all standard NI windows that pop-up briefing and then disappear because the go behind the main Labview vi window.
I have to use ALT+Tab to cycle through the Windows and get back to whichever pop-up has lost focus. And the problem is that my customer wont accept this!!
Any ideas?
Thanks in advance,
Ian
Solved! Go to Solution.
10-11-2011 07:05 AM
Hi Ian
I am just trying to understand better what you problem is, are you using the Modified "LabView Simple Operator Interface vi" to control a testStand sequence?
10-11-2011 07:55 AM
Hi,
Yes, that's the one. The modification to that example vi is that there is a 'hard-coded' test sequence that gets called on start up. No other changes to the functionality of the example vi.
I have been into vi properties and then the Window Appearance tab under the drop down and it is set to modal (see attached pic)M0nk3y01"
10-11-2011 03:59 PM
Ok, I've read around a bit more and in the Labview Help pages and can see that setting the OI vi to modal is a bad idea as this means the vi takes priority over windows (does beg the question as to why the vi was not always on top, but that's one for another time!)
I've changed the setting to be default appearance. This improves matters and I now have it so that the NI dialogue pop-ups stay in front of the simple OI most of the time, but if the user accidently clicks on an area outside of, say the UUT serial number dialogue box, then that box disappears behind my simple OI vi. This has probably drifted into being a Microsoft Windows management problem now, but I would really like to be able to control layering / focus / ordering via my TestStand sequence. Is there a PostUIMessage command I can use for example to minimise and maximise my simple oi vi programmatically from my TestStand sequence??
Thanks,
Ian
10-13-2011 03:28 AM
Hey Ian,
I know you can make a window within labview come to the front using property nodes and a VI server reference set to application. This works within labview instances but does not keep focus from other programs. I.e. does not bring a window in front of internet explorer just other labview windows.
I will keep experimenting to find if another setting will do what you want better. Meanwhile its a start for you to try as well. Let me know how you get on with this.
Matt
10-13-2011 05:10 AM
Hi,
Try using the TestStand - Start Modal Dialog.vi and TestStand - End Modal Diallog.vi.
It makes the calling dialog box VI modal to the TestStand main application window. Use the TestStand - End Modal Dialog VI to make the dialog box non-modal to the TestStand main application window.
10-13-2011 05:56 AM
Thanks Matt,
You suggestion works well for me. I can put your example vi within the PostUIMessage handling part of the Simple OI vi and then just call your example as when I need to ensure the window is frontmost or rearmost.
Cheers,
Ian
10-13-2011 05:57 AM
Ray,
Thanks for the suggestion. I've not tried it yet as Matt's suggestion worked for me, but I will try yours out too to see which works best in my software.
Thanks,
Ian
10-13-2011 06:03 AM
Hey Ian
Glad I could help!
Regards
Matt