Solved

Maximising / restoring VB2008 form causes corruption of desktop behind it

Posted on 2009-05-14
11
311 Views
Last Modified: 2013-11-26
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
0
Comment
Question by:ecicdev
11 Comments
 
LVL 9

Expert Comment

by:wellhole
ID: 24385840
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.
0
 

Author Comment

by:ecicdev
ID: 24385910
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?
0
 
LVL 9

Expert Comment

by:cdaly33
ID: 24385959
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?
0
 

Author Comment

by:ecicdev
ID: 24386018
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.  
0
 
LVL 9

Expert Comment

by:wellhole
ID: 24386103
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.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:ecicdev
ID: 24386324
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.
 
0
 
LVL 9

Accepted Solution

by:
wellhole earned 300 total points
ID: 24386395
If your programmer disables the timers and this doesn't happen anymore, then yes the problem lies in what the timers are doing. It could also be how the rest of the application responds to what those timers are doing. Either way, you won't know unless you disable them and test.

I also recommend checking out the paint procedure that your programmer wrote. Try disabling that.
0
 

Author Comment

by:ecicdev
ID: 24386428
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.
0
 
LVL 85

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 200 total points
ID: 24387823
I'd have to agree that it's probalby the form not "responding" quickly due to heavy processing with the timers.  If you have any LOOPS running in the Timer events then consider placing a call to "Application.DoEvents()" in there and see if that alleviates the problem.
0
 

Author Comment

by:ecicdev
ID: 24420005
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.
0
 

Author Closing Comment

by:ecicdev
ID: 31581495
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.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now