views:

192

answers:

3

I am trying to solve an issue in my application. I am developing the application in Vista and it works fine there, but when I take it to XP, the form becomes sluggish and unresponsive. When I watch the windows messages using breakpoints, I find that in XP the form is repeatedly painted about once every second (even though it does not really need to); however, the same test on Vista does not show this repetitive painting.

Any ideas as to what might be causing this?

+1  A: 

Without seeing the specific code etc I have no idea about your specific problem, however window painting in Vista is drastically different due to the Desktop Window Manager (DWM). The image of each window is actually cached/double-buffered due to the composition effect and therefore you will not see the flicker of repainting.

I'd suggest that you focus on resolving the problem on XP as it's obviously an issue that the DWM is masking on Vista,.

Jon Grant
+1  A: 

Something is causing part or all of your window to become invalidated.

As @Jon said not much detail, but here are some things to look for:

  1. Do you have custom paint logic? Describe it.
  2. Are there any timers in your code? What do they do?
  3. Does the flicker happen only when the program is in use, or also when your hands are off the computer and just watching?
  4. Are you just using standard .Net controls or any control libraries / user controls?
Eric J.
+3  A: 
Zach Johnson