Solved

VB6 DoEvents for Refreshing Only

Posted on 2007-12-05
5
2,686 Views
Last Modified: 2012-08-13
Is there an elegant way to use "DoEvents" in order to allow all the controls to repaint, but to ignore events triggered by the user during that time?

It's my understanding that DoEvents processes all of the messages in the message queue, not just the paint messages.
0
Comment
Question by:mecdesign
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Expert Comment

by:jmundsack
ID: 20412824
You could set the form's .Enabled property to False which would make it ignore all mouse and keyboard events but it would still respond to other events.  Then when you're done with the loop set the enabled property to True again.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 20412893
may be

dim ctrl as control

on error resume next
for each ctrl in controls
    ctrl. Refresh
next
0
 
LVL 10

Expert Comment

by:3_S
ID: 20414390
you can also just do a refresh on your form (this includes everything on it)
me.refresh
0
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 500 total points
ID: 20418526
0
 

Author Comment

by:mecdesign
ID: 20583450
I was hoping to find something that could resolve "app is not responding" issues.

Unfortunately, trying to get around that problem caused more problems like crashing when I experimented using DoEvents and DoEvents while disabling specific controls in this application.

This link from shasunder was pretty close to what I was looking for though:
http://www.vbaccelerator.com/home/VB/Tips/Force_An_Area_of_a_Window_To_Repaint/article.asp

Thanks for your help!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

696 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