NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

First modal panel dislpayed is hidden???

Solved!
Go to solution

Not sure if this is a LabVIEW or TestStand question, will post on both boards just in case.

 

We have developed a number of popup panels (with modal properties), in LabVIEW, that are called from a TestStand sequence to get information from and dislpay information to the user. 

 

Our target machine is has a dual monitor display from which the user can select which display to use; consequently we have to programmaticaly set the position of our modal panels before we display them to the user. 

 

We have implemented this functionality and when running on my development machine everything is displayed in the correct location. 

 

However when running on the target hardware (LabVIEW RTE and a LabVIEW TestStand Operator Interface) our popups in the FrontEndCallback are dislpayed correctly, but once we have selected and run a test sequence; the very first popup (which happens to be in the Process Model) is not dislpayed and the sequence hangs waiting for an operator interaction with the popup. 

 

We know the popup is being called because if we open any panel over the top of the TestStand Operator Interface (we have been using WindowsXP Control Panel but I am sure any other panel will have the same effect) and then close the panel (to force a redraw of the dislpay) our popup is there positioned correctly.  Once the first panel has been given this little kick start to make it displayed, all other popups are displayed correctly.

 

It seems like it is a screen update order sort of thing, that affects only the first popup after the TestStand Operator Interface has been given focus.

 

Any suggestions greatly appreciated.

 

Regards

 

Steve

0 Kudos
Message 1 of 3
(3,218 Views)
Solution
Accepted by topic author SercoSteveB

Hi Steve,

 

You could try calling the Windows API to set the position of the popup panel.

 

You could call the user32.dll and use the SetWindowPos  property to set thepanel position on the screen.

 

Hope this helps,

 

Regards,

 

Steve

Message 2 of 3
(3,179 Views)

Hi Steve

 

Thanks for your response. 

 

Good call.  Things have moved on a bit since my post.  We are using SetWindowPos to set the Z-Plane position, to TopMost, of our panels and it is ensuring the panels are displayed at the front of the display (which is nice), but it seems overkill to me.  I have technical queried NI and they can't find me an alternative solution, so user32.dll it is.

 

Steve

0 Kudos
Message 3 of 3
(3,163 Views)