05-21-2009 08:36 AM
I'm having a problem where both CVI and Labview popups are appearing behind the teststand execution window and it is not obvious that the popup is there and needs to be addressed. How can I make a popup or vi with interactive front panel show up in front of the teststand window?
05-21-2009 10:13 AM
Here's an example: http://zone.ni.com/devzone/cda/epd/p/id/4595
Basically you need to use the Modal VIs. I think they are Start Modal Dialog and End Modal Dialog and can be found in the TestStand palette.
Hopefully that gets you on the right track.
05-21-2009 10:16 AM
Forgot one thing. There is already an example that ships with TS: C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.1.1\Examples\ModalDialogs
🙂
05-21-2009 02:16 PM
05-22-2009 12:00 AM
So I guess I'm confused what you are looking for then. The way I understand it is you have some LabVIEW and CVI code that you are calling from TestStand? And you just want it to show up as the most front window so the user will see it and interact correctly with it? Am I missing something? If I'm not missing something then I can only think of two solutions:
1- Use the Modal VIs in the TestStand palette. These will place that code/dialog as the front most window for a given execution.
2- Call into the OS through it's API and manipulate the windows to be the most front.
Please let me know where I've gone wrong. Thanks,
05-22-2009 07:28 AM
05-22-2009 08:54 AM
As far as I know those are the only 2 ways to force a window position. I'm not sure I understand how your application cannot be modal? All you have to do is pass in the sequence context to your code modules. Or are you calling these directly from the User Interface? Even then you can pass in the reference to the ExecutionView Manager and get the Sequence Context. So as long as you have the Sequence Context you'll easily make it modal.
In case there's any confusion on what "modal" here means- when you make a code module modal using the Modal VIs it simply tells that code to be the front most window. It doesn't change anything else.
It's not too complicated in LabVIEW to call through the Windows API. Here is an example: http://zone.ni.com/devzone/cda/epd/p/id/4935 If you open up the zip file inside of there you'll find a WINUTIL library. Inside of there you will find a VI called Make Window Always on Top.vi. It simply show's how to make a VI most front. I'm assuming you can follow the same procedures in CVI. Or you might find an example already on NIs website.
Hopefully this helps some,
05-23-2009 11:49 AM