I've used this code from CodeProject. It's a "rotating" timer animation similar to that used by Firefox.
Add the dll as a reference to your project and drop the progress indicator on your form.
Set it's initial state to be invisible.
Then when you want to show your processing call:
this.progressIndicator.Visible = true;
this.progressIndicator.Start();
To remove it when the processing is complete call:
this.progressIndicator.Stop();
this.progressIndicator.Visible = false;
It uses a System.Windows.Forms.Timer
to control the animation and overrides the OnPaint
method to draw the image rotating. This is probably as accurate as you would need.
I'm not the author, but I have used this and not had any problems with it slowing the actual processes down appreciably.
However, you will have to put your processing onto another thread - use the BackgroundWorker
class, otherwise the UI won't update.