.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

how to use Progress Bar In c#

Posted By: kamlesh     Posted Date: January 31, 2011    Points:2   Category :Windows Application
Hi I have created one application and want t o take progress bar in it
when i click browse button and select one text file so for progress time for selecting the text will be displayed in progress Bar that in how many min it will upload it shon in Progress bar how it is possible in C# . Net lease help me

\Kamlesh Nikam

Author: Karthick             
Posted Date: January 31, 2011     Points: 5   


Am not sure about your question...but my idea about progress bar is below..Please go through it...

You should need a timer control for using progress bar...Set "Interval" property of timer control as 1000(it refer 1second).Inside that timer click event

progressbar.value=progressbarmaximum/4; (it depends on your requirement)

Hope it helps you...

Author: Mihir Soni             
Posted Date: February 01, 2011     Points: 5   

        protected void button1_Click(object sender, System.EventArgs e) {

//this checking is automatically done as stated in the Ref Documentation
//but it does not work , BUGssssss
//so we have to do it shhhhh ....
if (progressBar1.Value == progressBar1.Maximum){
progressBar1.Value = progressBar1.Minimum;
textBox1.Text=progressBar1.Value.ToString() ; // Displays the values of progressbar in textbox


Just add this after the selection of textfile and make sure you have drag dropped Progress bar in your design view and set your MIN and MAX property

Thank you.

Mihir Soni

Visit my www.r4id.wordpress.com for more information on ASP.NET

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend