Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress bar update

Status
Not open for further replies.

ctiwari

Technical User
Aug 5, 2003
6
US
Hi,

I am using a progress bar to display the status of some data operations that I am performing (reading data from an access database, calculating certain fields and then writing the output to a CSV file). However, after the first block on the progressbar, the screen fails to refresh and seems to freeze.

I tried using a form.invalidate function to force a screen refresh, but I don't know if that is a correct thing to do?

Any suggestions will be most helpful

Thanks,

Chet
 
Assuming that there is some sort of loop doing the hard work behind the scenes, insert an Application.DoEvents to allow the application to process other events that are queued up (i.e. the repainting of the progress bar).

If you wanted to be really flashy, you could execute either the working code or the progress bar update on a seperate thread, although the overhead and complexity of managing threads can sometimes outweigh the benefit...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top