LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you use InstallPopup?

The help files are not very clear on how to use "InstallPopup".

They say it lets you use a loaded panel as a modal control. While the panel is displayed, it should halt the thread that called "InstallPopup".

My problem: My thread isn't halting after I call "InstallPopup" to load up a custom popup window. I've tried having the panel displayed before and after "InstallPopup", but I haven't had any luck.

What is the correct usage of this function?

- Nobody
0 Kudos
Message 1 of 3
(3,744 Views)

Hello,

The documentation mentions that InstallPopup creates a modal box.  While the modal dialog box is visible, the user cannot operate any other panels that you created in the same thread.  This function call does not halt the execution of the current thread. The following KnowledgeBase describes the most common use of the InstallPopup function and includes an example.

How Do I Create a Modal Pop-up Panel in LabWindows/CVI?

Hope this helps.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 3
(3,740 Views)
InstallPopup() displays and activates a panel as a modal dialog box. You can't operate controls on any other panel in the same thread, but your code doesn't wait for the panel.  Use GetUserEvent() after InstallPopup() to wait for the panel.  Call LoadPanel on the panel before calling InstallPopup.
GetUserEvent(), with the wait mode set True, will wait for a commit event to be generated. It returns the control ID. If you want to continue only on EVENT_COMMIT from a certain control, you can call GetUserEvent in a loop until the control ID matches the one you want. Since InstallPopup sets the popped-up panel to be modal, you will only get EVENT_COMMITs from the popup panel.
RemovePopup(0) removes the active popup.
Message 3 of 3
(3,705 Views)