Link to home
Start Free TrialLog in
Avatar of ecicdev
ecicdev

asked on

Maximising / restoring VB2008 form causes corruption of desktop behind it

Hi,
I have a VB 2008 application to which I recently added a couple of timers.  Since then, when I maximise the VB form and then reset it to its "normal" size, I find that the desktop behind the form is corrupted; several of us get a second copy of the desktop icons and background overlaid where the form was.  Another colleague finds the icons on his desktop flickering as if the cursor is tabbing from one to the next very quickly.

The duplication effect seems to pick up the contents of the desktop from behind the maximised form, and copy them behind the form when it is normalised.    A partial screenshot of the problem is attached.

I think this might be a video driver issue as the three users with the duplication problem have Nvidia 7300 LE cards, and the user with the flicker has an Nvidia 8600 GT.  However, I've updated my driver to the latest version with no effect.  Does anyone have any experience of a similar problem?  We're running Windows XP Pro on Dell machines.

With thanks in anticipation,

John.
Desktop-Corruption-Issue.png
Avatar of wellhole
wellhole

If this only happens with this VB form that you mention, then its unlikely the video card that causes the problem, especially if you're running it across multiple machines. Its extremely probable that your form has issues, such as with the paint procedure.
Avatar of ecicdev

ASKER

Thanks for the stunningly quick reply.  I'm happy to believe that it's my form, but I'm unaware of anything I can do to affect the desktop behind the form; could you give me any pointers on what I should be looking for or what commands might help sort out the problem, please?
What happens if when on the desktop you press the F5 key to refresh the desktop.  Does it clear up?  Is there any other method you've found to clear up the issue if even temporarily?
Avatar of ecicdev

ASKER

Hitting F5 - or blatting another form over the affected part of the desktop and moving it away clears the problem - the desktop re-appears fine.  
Unfortunately, there is no one click fix for this as far as I know. Refreshing the desktop is about the only way you're going to clear up the desktop. You could also maximize another window, or use the Show Desktop icon or option in the right click menu on the taskbar.
Avatar of ecicdev

ASKER

Thanks for this.  Unfortunately while these methods would clean up the desktop, none of them are going to let me get my VB App promoted to production as it won't pass Quality Control (he's called David... my boss).
If you have any thoughts on what area of the program (just the timers?) might be causing the issue, they would be much appreciated.
 
ASKER CERTIFIED SOLUTION
Avatar of wellhole
wellhole

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ecicdev

ASKER

Thanks.  There is no paint procedure, but I'll have another play with the timers.  I'll be away for a few days, but a colleague of mine will be looking at the issue in the meantime... I'll get back to you when I'm back at work on Tuesday, but you may hear from him in the meantime.
Many thanks or your help to date.
SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ecicdev

ASKER

Thanks for this suggestion, Idle Mind.  I did try inserting DoEvents within the timer code but it had no effect.  Thanks for the thought, though - well worth a go.
Avatar of ecicdev

ASKER

This turned out to be one of those nasty ones where there is no clean fix, I think - I've awarded the points as a thankyou for the suggestions, which were none the less helpful.