LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Panels not redrawing correctly in XP

Our application has a base panel that fits the screen and child panels that are loaded into it. The redraw problem only happens when loading a child panel. When you do this, all child panels are usually blank - sometimes you can see the child panel's top bar. If you can find the top bar of the child panel and double click on it, the child panel redraws properly but the background does not. You can then move that panel around and the background redraws only where the panel has been moved to. He also says that minimizing the application and bringing it back will (2 out of 5 times) bring up a blank screen and, again, if you can find where the top bar of the child panel is supposed to be and double click on it, the panel will redraw. T
his will happen after he has been using the software for some time. Then, he won't be able to reproduce it again for a while. It leads me to think that some event queue that handles draw events is losing some of the event items, then clears out and is able to handle the events properly again.

We did manage to get this to happen at one point where we allow a new users to login, then we clear off tests, and reload our main panel. I was watching memory usage and there was no significant spike, but the CPU maxed out at 100% for a second or two, then the blank or incomplete panel came up.

Judy
0 Kudos
Message 1 of 3
(3,241 Views)
The first thing that springs to mind, is a lack of PROCESS_DRAW_EVENTS being called within your program.

Minimizing and then Maximizing the panel would have the effect of firing off a PROCESS_DRAW_EVENT automatically, but if loads of other EVENTS have happened at the same time, you will lose some, some of the time.

Sounds like it is specific to XP from your question title, and I don't know what is different in XP (Other than some fancy GUI Schemes that it now uses).

Sorry, thats all I can think of at the moment.

Regards

Chris
0 Kudos
Message 2 of 3
(3,241 Views)
Hi Chris,

I had loaded the code with ProcessDrawEvents() calls to no avail, but our Networking guy had an idea that seems to be helping. XP has some performance options that can be set in the system settings. The default option is to let windows decide performance issues, but there is another option for best performance. When we chose this, the redraw problem seems to go away. We haven't fully tested the software yet, but we were able to get rid of a redraw problem that we had seen consistantly.

What to do:

-go to "My Computer" and right click
-click on "Properties"
-click on "Advanced Settings"
-click on "Performance Settings"
-change to "Adjust to best performance"

Please let me know if this works for others who are having the same problem.


Thanks,

Judy
0 Kudos
Message 3 of 3
(3,241 Views)