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.
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;
Hi, from the below code
this.ProgressBar_Download.MarqueeAnimationSpeed = 30;
this.ProgressBar_Download.Style = ProgressBarStyle.Marquee
I am not gettting MarqueeAnimationSpeed and ProgressbarStyle.Marquee
What dll i have to add for that.
Plz help me regarding this
I got the style and MarqueeAnimationSpeed. But how to add Progressbar to the window or Grid. I am not able to add to the grid bcoz progressbar is not from System.windows.controls it is from System.windows.forms
All Windows Forms applications should include a reference to System.Windows.Forms dll.
You should start from scratch and create a “Windows Forms” project using Visual Studio. This will ensure you have everything you need for a Windows Forms app.
This works well, thank you. The bar slides now from left to right and start again at the left side.
Is it possible to make the bar slide from left to right and than back from right to left?
Re: Is it possible to make the bar slide from left to right and than back from right to left?
Like the Cylon eyes? Cool! But I don’t think it’s possible with the stock ProgressBar. Probably your best bet is to create an animated GIF and show it in a PictureBox.
thank you my friend
i have tried your way above, but nothing appear..is there something that I need to put besides those two line above?
how about progressbar1.show()?
or should I put the progress bar inside windows form?
ProgressBar is a Control that must be placed inside a Windows Form to see it.
Hi friends,
Visit the following link. It’s excellent stuff..
http://www.codeproject.com/KB/cpp/SPB.aspx
Regards
Arjun
Thanks, this was useful.
its gud, but i still have a prob.
when i click on a button to check the result, progreebar stops moving.
plz tell me the proper solution .
Thank you very much for useful advice.
Sir / madam
i want to generate a progress bar after login window by using timer control pls help me i am waiting to u reply
thank u sir
check this article
http://mindstick.com/Articles/b0025ebc-defb-4267-bd3a-68f0f999a226/?ProgressBar%20Control%20in%20C%20Net
I’ve converted this code of VB.NET:
ProgressBar1.Style = Marquee
ProgressBar1.MarqueeAnimationSpeed = 30
That’s it, run the code and you’ll be good to go..
Thank you very much!