We have an object that allows other forms to easily access the status bar of the main Form through the use of delegates hooked to the main form. We use it to update text so the user knows what is being worked on in a longer process. I added an ultraactivityindicator to one of the panels of the status bar. The code gets called to start the activityindicator but it does not turn on. Is this a known bug with this control? I can supply sample code if needed.
It does turn on... but after all other processing has been completed. If you stop the debugger you can see that the code is stepped through but the indicator never changes state.
Attached is a solution project with a simple version of the code that shows the problem
As it turns out, the call to UltraActivityIndicator.Start() is getting processed before the long-running method. The reason the indicator doesn't get updated is because the long-running process doesn't give Windows any time to update the form. If you were to place a call to Application.DoEvents() in either of the for loops, you would see the indicator update as expected. However, it is not recommended to use Application.DoEvents() as it can lead to unstability in your application.
So basically... unless you are processing on a background thread -- you cannot use the UltraActivityIndicator
UPDATE STATUS: I am working on implementing all of our long processes as background workers. It is working very well. Thank you for your help
I'm glad everything is working well. Do you have any other questions about this?
Everything is working great...thanks for the followup.