dpatel_team
asked on
adding progress bar
Hi
I have an a windows form application that use one class (its name is Parser)
this form has a button and when i click on the windows form application button it call one of the parser class method . this method simply read text file line after line and write each line to separate file.
i would like to add a progress bar to the form in order to show the progress( it is a very large file )
any idea how to do that? I have in the Parse class 2 property one for the number of line in the file and the second how much lines already checked.
here is my button2_Click function
I have an a windows form application that use one class (its name is Parser)
this form has a button and when i click on the windows form application button it call one of the parser class method . this method simply read text file line after line and write each line to separate file.
i would like to add a progress bar to the form in order to show the progress( it is a very large file )
any idea how to do that? I have in the Parse class 2 property one for the number of line in the file and the second how much lines already checked.
here is my button2_Click function
private void button2_Click(object sender, EventArgs e)
{
if (this.textBox1 != null & this.textBox2 != null)
{
inst.init(this.textBox1.Text, this.textBox2.Text);
//this.progressBar1.Show();
inst.ParseTheFile();
System.Windows.Forms.MessageBox.Show("Parsing finish successfully");
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.java2s.com/Code/CSharp/GUI-Windows-Form/ProgressBarinC.htm
http://www.daniweb.com/software-development/csharp/threads/213583