Solved

How do you stop a progress bar flickering

Posted on 2004-04-01
4
168 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
Comment Utility
add Do Events in your loop
0
 
LVL 8

Accepted Solution

by:
plq earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
That wouldnt do it
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

744 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

19 Experts available now in Live!

Get 1:1 Help Now