Link to home
Start Free TrialLog in
Avatar of dpatel_team
dpatel_teamFlag for United States of America

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

   
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"); 
            }
        }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial