?
Solved

VB6 DoEvents for Refreshing Only

Posted on 2007-12-05
5
Medium Priority
?
2,705 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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

752 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