Progress Bar not updating correctly

03-15-2006, 04:50 AM

I am trying to display progress to the user during processing of a loop which may run many thousands of times.

I open a simple form which displays two datetime picker controls to select the start and end dates for a report. When the users clicks to generate the report, I have a progress bar which should update every 20 iterations of the loop. However, sometimes it works fine, other times it does a couple of blocks on the progress bar then nothing. MY form says "not responding" at the top but after say 20 seconds the form clears and it shows my report so I think its just not processing Paint requests sometimes. How do I ensure paints are processed?

My progressBar.Step value is 20 so it should only update every 20 iterations of the loop.

Here is my code:

If ((lnToProcess Mod progressBar.Step()) = 0) Then
End If

Many thanks,

03-15-2006, 11:07 AM
trying with


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum