LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Loss of main panel UI when running a long time

I have been seeing this problem with many of our CVI based tests we run.  A CVI application will be running for a long time, often with the program's UI (the main panel) minimized, and it becomes impossible to restore the UI panel.  The application's code will still be running and reading the DAQ equipment, but the UI just won't come back.  The telltale sign is when right-clicking on the application's button on the taskbar, only the Close choice is available (the Restore/Minimize/Maximize choices are disabled).
 
We have some applications that use the RunUserInterface() call, and others that use a main loop with ProcessSystemEvents() and a Sleep() delay.  This difference in the main loop has no effect on this problem.
 
Has anyone else seen this?  I can't find any answers in the NI support system.
 
Nick
Whirlpool Corp.
0 Kudos
Message 1 of 4
(2,964 Views)

Hi Nick,

we have several applications that use to run for several months and never had suffered a problem like yours. It is to be said that we usually don't minimize the main panel but one of those applications can be "minimize" by the user: the main panel is actually minimized but a small window remains left on the screen holding some informations on the test processing: a button on that secondary window restores the main panel. You could try something similar, i.e. not relying on system menu commands to restore your application but but using an explicit callback to restore the main panel of your application.

Just my 2c...



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 2 of 4
(2,946 Views)
Many of our CVI apps also minimize to a little window, but I had found a way to prevent this with the following 2 steps which I got from an NI Knowledgebase article
 
1. I added the following line before displaying the main panel

SetSystemAttribute(ATTR_TASKBAR_BUTTON_VISIBLE, FALSE);

2. I edited the main panel in the UIR so the option "Has Taskbar button" is enabled.

With these changes, the main panel will minimize to just a button.  The only drawback is the program is no longer listed as an "Application" in the Windows Task Manager.  It appears as a process though.

I did have one instance of this issue appear when the main UI was NOT minimized.  In this case, the UI was displayed, but would not respond to keyboard or mouse events.  The system menu did work and I was able to minimize the panel, and thereafter it could not be brought back.

We do have many of these applications running on older PCs that are running Windows NT 4.  Do you think the OS may be an issue here?

0 Kudos
Message 3 of 4
(2,937 Views)

Hello,

         Even i am facing the same problem during the run time if i maximize for sometime again 'm not able to restore it back ..I tried the option Has task bar but no use 

0 Kudos
Message 4 of 4
(2,507 Views)