Anyway here's the code:į = oCustList.Count - 1Ĭall oUtil.SetStatusMessage("Importing Customers.")įor i As Integer = 0 To oCustList.Count - 1ĭim oCust As ICustomerRet = oCustList.GetAt(i) This application is not multithreaded so I don't believe it's a threading issue although a background worker might help. I'm calling do events between a each invocation which should allow the progressīar and update itself. Below is an example of the where I'm updating the progress bar. Thanks for taking the time to reply to this. In fact, this function can be found on all controls and is a much preferred and more surgical technique to the more problematic Application.DoEvents call which clears the entire message queue for all the controls The Refresh() method on teh progress bar. If you are already using a background worker but are still having issues or else you don't want to attempt it you could try something a little brute force which is to explicitly ask the progress bar to update itself. well, five million example of using a background worker online - the MSDN example for the class is a good start: Object to perform the intensive operation that requires the progress bar in the first place. This is probably due to the fact that there are many things happening on the main thread concurrently and the painting of the progress bar is not given the priority by the system resources.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |