Solved

How do you stop a progress bar flickering

Posted on 2004-04-01
4
173 Views
Last Modified: 2010-05-18
How do you stop a progress bar flickering?
when I iterate through 2000 values my progress bar flickers.why does this happen? How can I prevent it?
Cheers
0
Comment
Question by:visualbasic
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 10734270
add Do Events in your loop
0
 
LVL 8

Accepted Solution

by:
plq earned 50 total points
ID: 10735939
start
    LockWindowUpdate pbr.hwnd
... do processing
    LockWindowUpdate 0&
... update pbr
    LockWindowUpdate tbr.hwnd
... do processing
    LockWindowUpdate 0&
... update pbr
    LockWindowUpdate tbr.hwnd
... do processing
    LockWindowUpdate 0&
finished


Public Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
0
 
LVL 8

Expert Comment

by:plq
ID: 10735954
on the other hand, maybe you're updating it every record. Only update it every 100 records

if lCount mod 100 = 0 then
   ... update pbr
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 10736008
That wouldnt do it
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Write data from SQL to CSV file - position 1 58
VBS file using code from 2nd file (txt or vbs) 4 36
How to debug this code 7 61
Microsoft Access combo box help 2 44
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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

813 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

17 Experts available now in Live!

Get 1:1 Help Now