dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Panel Controls Not Painting Correctly

Question:
I have a 3D Panel on a form that fills in incrementally when certain operations are run. I expect that the panel should be visible when the form appears on the screen. The 3D panel is the only object on this form. Problem: When I run the program and select an operation where the form is used, the form appears, but the area of the form where the panel is seems "transparent" (I see the backcolor of the form behind it). When I toggle a breakpoint, and step through the code, it works perfectly. The panel appears as it should.

Answer:
This sounds like an event queue problem. Controls are not refreshing because the system is busy doing other things. You might want to try putting a DoEvents in every so often in your work loop. Even though Windows is a 32 bit, multitasking system, it still tends to forget about screen refresh events sometimes. The DoEvents forces the queue to flush and get processed.

It's typical that it works under debug mode, since under debug mode the event queue doesn't work the same way. I've seen all sorts of things work normally under debug mode and then break out of debug mode.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date