Hi,
I want to run progress bar in my windows application on the button click event without use of timer . How this possible?
Hi,
I want to run progress bar in my windows application on the button click event without use of timer . How this possible?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted May 17, 2012, 11:57 AM
progressBar1.Value = 0;
while (progressBar1.Value < 100)
{
progressBar1.Increment(10);
}
Thanks
Pravinkumar BirajdarPosted May 17, 2012, 10:00 AM
private void button1_Click(object sender, EventArgs e)
{
if (progressBar1.Value < 100)
{
increase:
Thread.Sleep(100);
progressBar1.Value += 10;
counter += 10;
if (counter < 100)
{
goto increase;
}
}
}