question

HemanthB-9452 avatar image
0 Votes"
HemanthB-9452 asked $$ANON_USER$$ edited

Progressbar in c#

Hi, I am creating a progress bar in windows forms application c#. I want the progress bar to do some specific tasks I specify once it’s complete. Like once the progress in the progress bar completes, it should open another form. Please can anyone give the code for what I want.

dotnet-csharp
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

$$ANON_USER$$ avatar image
1 Vote"
$$ANON_USER$$ answered $$ANON_USER$$ edited

You could try this:

 If (ProgressBar1.Value == ProgressBar1.Maximum)
    {
     Form2.Show()
    }

Just make sure you add this after the statement that updates the progress bar's value. Also this code assumes that the form you want to call is named, Form2.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.