For some operations such as logging on to a web site or downloading a web page, you may not know how long it will take the operation to finish. So instead of showing a progress bar with a specified percent complete, you can set the .NET ProgressBar to cycle continuously.
To make a ProgressBar cycle continuously, set the MarqueeAnimationSpeed property to a positive value (by default, it is set to 0). The value specifies the time period, in milliseconds, that it takes the progress block to scroll across the progress bar. A higher value results in a slower speed, and a lower value results in a faster speed. I've found that a value of 30 works pretty well. It’s also important to set the Style property to ProgressBarStyle.Marquee.
this.ProgressBar_Download.MarqueeAnimationSpeed = 30; this.ProgressBar_Download.Style = ProgressBarStyle.Marquee;
To stop the cycle, set the MarqueeAnimationSpeed property to 0. To resume the cycle, set it to a positive value.
Related posts:


in this website every code is found.
Hi,
I have set:
this.progressBar1.MarqueeAnimationSpeed = 30;
and this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
but when I run the program, it was showing the % completed. I want to see the bar running in continuous because I don't know when it is finished.
Please assist me what I have to set in property.
thanks,
Arvin
The key is to set this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;