Well, I really dont know how a progress bar really works. Well what I want is to be connected to a button_click event. When I press a button, I want it to fill up then disappear. How would I do that
Ok. I still dont understand. I figured out how to use the timer with the progress bar, but when it fills up, I need it to disappear. How would I do that
One solution is to wireup the Click event of the ProgressBar. In the event handler check to see if the ProgressBar's value is equal to its Maximum, like this:
public MyConstructor () { pb = new ProgressBar(); pb.Click += new EventHandler(pb_Click); }
Progress Bar
PaTaKi
maybe you can try :
ProgressBar.Visible = false;
greetings
SpyKraft
Roboss Liu
Here is a tutorial on Progress Bars:
http://www.c-sharpcorner.com/winforms/working_with_progressbar.asp
Regards,
Vikram
Regula
public MyConstructor ()
{
pb = new ProgressBar();
pb.Click += new EventHandler(pb_Click);
}
void pb_Click (object sender, EventArgs e)
{
if (pb.Value == pb.Maximum)
{
pb.Visible = false;
}
}
You will of course have to worry about thread-safe practices if you're using multiple threads (I assume you are).