LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Popup over a maximized panel disappears

Hi all, I have an application that must run full screen. For this reason I display the main panel with SetPanelAttribute (mainH, ATTR_WINDOW_ZOOM, VAL_MAXIMIZE); and it runs correctly.
 
Now, under certain conditions stated by an external configuration file, at startup the application must wait for particular messages on the network before starting: in this condition I place a InstallPopup immediately before RunUserInterface for displaying a "Waiting..." message. This is the resulting sequence of operations:
 
SetPanelAttribute (mainH, ATTR_WINDOW_ZOOM, VAL_MAXIMIZE);
InstallPopup (otherPanel);
RunUserInterface ();
 
My problem is, on some computers (obviously the customer one: Murphy's law! Smiley Wink ) the popup panel does not appears, as if it laid down the main panel! Nevertheless, the main panel is inoperable since the popup is in effect so the program is waiting for events on the popup and does not processes mouse clicks on main panel Smiley Mad
To display the popup I must show the windows Start menu bar and click on the button corresponding to my application: the popup then appears and behaves regularly.
 
Anyone has an idea to face this problem? What is astonishing me is that this does not happens on all computers the application is running on, so I cannot post a sample project for sombody to test! Smiley Sad
 
I was wandering if using a deferred callback that fires the popup after ProcessSystemEvents can help clearing this situation.
 
Thanks to all for the suggestions.
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 1 of 9
(5,077 Views)

Perhaps something like this might help:

    SetPanelAttribute (mainH, ATTR_WINDOW_ZOOM, VAL_MAXIMIZE);
    DisplayPanel (mainH);
    Delay (0.2);
    InstallPopup (otherPanel);
    RunUserInterface ();

The slight delay might encourage Windows to draw the windows in the order you require, rather than the (apparantly unpredictable) order that sometimes occurs.

JR

Message 2 of 9
(5,066 Views)
Perhaps a SetActivePanel helps ?
0 Kudos
Message 3 of 9
(5,031 Views)
Thanks JR and Han for the help: tomorrow I'll go to my customer and I will make some tests: I hope one or the other suggestion will help.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 9
(5,030 Views)

Roberto,

Please do keep us posted. I have also heard stories from our users that a panel displayed via InstallPopup appears behind the main program panel. However, it has been very, very rare and I have been unable to replicate it. 

The common thread (so to speak) is that in our case it was also associated with a popup that displayed after some external interaction with either another app (via DDE or ActiveX) or with a floppy drive -- both of which are relatively slow processes.

Good luck!

--Ian

0 Kudos
Message 5 of 9
(5,014 Views)
Recently I had a similar problem that involved the open file dialog window being displayed behind another panel. I found that by changing the floating style of my panels to "never" seemed to resolve my issue. I too only saw this problem on some systems. However I did find that the issue was very reproducible on win2000 systems.
 
-Ryan
0 Kudos
Message 6 of 9
(5,013 Views)
Amazingly I was on the phone today with a client and they were experiencing this very issue!
 
In their case the sequence was like this:
- main window open, but not maximized (float = never)
- main window's menu option brings up modal panel "A" (float=never; not maximized) with InstallPopup
- clicked on button that writes several large data files (using fopen/fwrite/fclose) to a network server that was sluggish today
- panel "A" disappeared (presumably behind main)
- MessagePopup that is displayed after data is written did not appear
- swapping to another application and back to mine restores my app to its proper state, i.e. main, with panel "A" on front of it, and the MessagePopup in front of "A"
- normal behavior after that
 
So I'm still of the opinion that this issue arises when an external drive or app is slow to respond.
 
--Ian
 
Message 7 of 9
(4,989 Views)
One more thing I forgot in my last post: When they saved to a local drive, the issue did not happen (i.e. Popups were all in front), and when they went back to saving to the sluggish network drive it re-occurred, and the popups were behind.
0 Kudos
Message 8 of 9
(4,980 Views)

Hi all, yesterday I visited my customer and tried to modify the program according to some of your suggestions. It seems that the problem is solved now by simply adding a delay like JR suggested with a ProcessDrawEvents as an addition, but...

...but really I made a second major modification to the whole application that is in the line of Ian suggestion -even though I didn't saw his post yesterday: I would had made some check in this direction...

Basically, my application must interact with plant profibus network via an Applicom network card. Now the situation is that network board initialization is a **very** long process: I had configured this as a service in WinXP so that it should start before my application does, but really this service starts about two minutes AFTER windows has completed starting, that is well after my application tries to access the network (consequently getting an error from the driver). Since this is not accettable in my application (an automatic tester on a production line: the operator is not supposed to know anything about computers and network and so on, so the machine must start without errors and without human intervention) I modified setup of the system so that network driver is *surely* started before my app.

At the end of all, the application runs OK, but unfortunately we don't know exactly if the solution is on the of JR or Ian suggestions Smiley Indifferent

Anyway thanks to all for the help


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 9 of 9
(4,944 Views)