NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview and CVI popups appear behind teststand window

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?

0 Kudos
Message 1 of 8
(4,783 Views)

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.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 8
(4,777 Views)

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

 

🙂

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 8
(4,775 Views)
This is not a modal application.
0 Kudos
Message 4 of 8
(4,763 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 5 of 8
(4,750 Views)
You are correct about what I am trying to accomplish, but the software is not setup for modal operation and I don't want to be stuck with modal operation either. The second option is already too complex. I just want the popup to appear where it it supposed to appear. In front of the teststand window.
0 Kudos
Message 6 of 8
(4,743 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 7 of 8
(4,738 Views)
I think that the VI Server method Bring To Front will also do the job in LabVIEW. Don't know about CVI, probably use those Windows API calls. You could also use VI server to place the pop ups in a spot they might stay visible if they do go to to the back. If it's not modal then the user could click or alt-tab around and then lose the dialog and there's nothing to be done about it, except maybe put some loop in the dialog that calls Bring To Front every n seconds.
0 Kudos
Message 8 of 8
(4,713 Views)