LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

bring messagepopup to front

Hi

 

My test flow goes like this :

1. Show a message prompt to the user to connect the test setup.

2.Open the exe in minimized mode and then open subwindows in that (Like opening internet explorer and then opening submenu like Tools--> Internet Options)

3. Actually exe is shown as active once it is opened. So used "MakeApplicationActive" to bring CVI application to front.

 But when a message prompt like confirmpopup has to be shown to user after this step,the popup is hidden behind the CVI panel.

Can anyone suggest me how to bring that message popup to front so that user knows that popup is shown?

 

Thanks,
MSP

0 Kudos
Message 1 of 6
(4,202 Views)

Hi,

 

to my understanding popups should always be in front (except that you set your panel to always float); but there is a related issue with CVI, see here, which might be the cause of your observation

0 Kudos
Message 2 of 6
(4,199 Views)

Hi ,

 

Panel floating style is set as "Never". In my case i am able to view the popup by selecting labwindows cvi application from the taskbar and all the subsequent popups are shown as expected.

 

Thanks,

MSP

0 Kudos
Message 3 of 6
(4,195 Views)

MSP:

 

There are a couple of other things you can try.

 

You could use a timer to force your window to be the foreground window using the Win32 API (or Windows SDK) SetForegroundWindow() function.  See my message and example here: http://forums.ni.com/t5/LabWindows-CVI/Make-panel-modal-from-a-CVI-dll/m-p/1316925#M50035

 

If you need just a simple dialog box, you can use the Windows SDK/Win32 API MessageBox function to create a real system modal dialog box.  See my old example here. http://forums.ni.com/t5/LabWindows-CVI/MessagePopup-dissappears-behind-active-panel/m-p/182045#M1409...

0 Kudos
Message 4 of 6
(4,187 Views)

Al S,

 

Thanks for your response. When tried with MessageBox function, my problem got resolved.

 

But i would like to know, is it possible to bring the popup to front using "MessagePopup" CVI function instead of "MessageBox" function since i have used MessagePopup function in most of the places in my code.

 

Thanks,

MSP

0 Kudos
Message 5 of 6
(4,165 Views)

MSP:

 

I haven't been able to duplicate your problem, but I'm still running Windows XP, and the known issue 193088 that Wolfgang pointed you to applies to Windows 7 and Vista.

 

You said that you open the exe in the minimized mode.  Are you using LaunchExecutableEx() to do that?  Have you tried launching with other window states that leave focus on the calling app, like LE_SHOWMINNOACTIVE, LE_SHOWNA, or LE_HIDE?

 

Known issue 193088 states If a LabWindows/CVI popup panel is not active, subsequent popup panels may appear behind the original popup panel.

Do you have any popups open when you launch the exe?  Can you close them before launching the exe?

 

Do you have a delay after launching the exe, and before calling MakeApplicationActive() to give the exe time to start?

0 Kudos
Message 6 of 6
(4,149 Views)