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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Pravinkumar BirajdarRank #4,618 · 334 reputationPosted May 17, 2012, 6:00 AM EDT
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;
}
}
}
Satyapriya NayakRank #47 · 31.5K reputationPosted May 17, 2012, 7:57 AM EDT
progressBar1.Value = 0;
while (progressBar1.Value < 100)
{
progressBar1.Increment(10);
}
Thanks