04-15-2010 05:03 PM
Hey NI Nubie,
Could you post a simple example that still reproduces the hidden popup that you are describing? Once I can reproduce this here at NI I should be able to dig a little deeper and find the root cause of the issue. Thanks also to Ian as it sounds like this this definitely the same problem and your information on the other post should help us isolate this.
Lars L
National Instruments
04-15-2010 06:32 PM
Lars,
I tried the CA_InitActiveXThreadStyleForCurrentThread (0, COINIT_APARTMENTTHREADED) command recommendation from the other thread but that did not work.
I will work on an example over the weekend as the project is quit huge with many files etc.
Thanks.
05-09-2010 02:02 PM
Hi Lars,
Here is an example project finally.
Run the App and then do the following:
LabWindows/CVI 9.0 Version 9.0.0. (348)
Thanks.
05-13-2010 11:47 AM
Hi,
I was able to reproduce the problem with your test program. Thanks for taking the time!
This does look like a bug. I've created a bug report for it (#227279) and I'll post an update here when we have a fix and/or a workaround.
Luis
06-10-2010 05:17 PM
Hi Nubie,
This problem has now been investigated and fixed internally. The fix will be included in the next major release.
The short explanation of the problem is that the logic for handling the interaction of floating panels with popup panels is fairly complicated and, in this case, it was being thrown off by the concurrent minimization of the floating panel.
As a temporary workaround, since you can't change the floating style of your panel to "Float app active" (which would make the problem go away) you could also programmatically disable floating around your popup call. Like this:
SetPanelAttribute (panelHandleSd, ATTR_FLOATING, VAL_FLOAT_NEVER);
result = ConfirmPopup (msg_str, SdMsg2_ptr);
SetPanelAttribute (panelHandleSd, ATTR_FLOATING, VAL_FLOAT_ALWAYS);
Luis
06-10-2010 06:08 PM
Hi Luis.
There is a problem with the workaround.
If the SD_PANEL is minimized (with the mouse click in the left box top right corner) then it never comes back and the user cannot see the instruction message displayed on the SD_PANEL.
The SD_PANEL must always be visible for instructions to the user.
Also if the main application panel is minimized then when restored from the task bar then the SD_PANEL must also be restored as well as the confirm popup window.
Let me know if this is not clear.
Thanks.
06-11-2010 10:36 AM
I'm not sure I follow completely. But I'll restate what I think I understand, and if I'm wrong, please correct me.
The new scenario, as I understand it, is that the user minimizes the SD panel -- not the main panel. This would leave only the main panel visible. Some time later, you programmatically display the confirmation popup. But the problem is that you need the SD panel to be visible when the popup is displayed. Is this correct?
Well, the act of displaying a popup does not necessarily cause minimized panels to be restored/displayed. With one notable exception: if the application itself is minimized (not just its individual panels), then the application must be restored in order to display the popup. Because you have set the "minimize other panels" option in the main panel, when the user minimizes the main panel CVI will minimize the entire application. Therefore, when the popup is later displayed, the application is restored and its windows are made visible again. But you don't have this attribute set for the SD panel, therefore minimizing this panel does not minimize the entire application.
If you need the SD panel to be visible when you display the popup, why don't you restore it explicitly by setting its ATTR_WINDOW_ZOOM attribute before you display the popup?
06-11-2010 11:17 AM
Not quite.
If the SD_PANEL is minimized leaving just the main panel visible and then some time later the confirmpopup is programmatically displayed, after the confirmpop has been dealt with the SD_PANEL cannot be found (maximized) (i.e. it is not visible and not on the task bar) it's like it vanished for good.
I could try the DisplayPanel (panelHandleSd) command immediately after the Comfirmpopup () to see if that brings it back?
The SD_PANEL does not have to be displayed at the same time as the confirmpopup but only immediately after the comfirmpopup has been dealt with.
06-11-2010 12:10 PM
Hi Luis.
This works with your workaround:
SetPanelAttribute (panelHandleSd, ATTR_FLOATING, VAL_FLOAT_NEVER);
result = ConfirmPopup (msg_str, SdMsg2_ptr);
SetPanelAttribute (panelHandleSd, ATTR_FLOATING, VAL_FLOAT_ALWAYS);
***SetPanelAttribute (panelHandleSd, ATTR_WINDOW_ZOOM, VAL_NO_ZOOM);***
Thanks!!!!
06-14-2010 10:54 AM
Hi Nubie,
The reason the SD panel is disappearing after the user minimizes it is because it has its "Has Taskbar Button" attribute disabled in the UI editor. If it were visible, then the end user would be able to minimize it and then restore it from the taskbar, without you having to explicitly restore it programmatically.
Luis