How to cancel the progressbar in backgroundworker when clicking the cancel button . using c#.net?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
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
Sivaraman DhamodaranRank #40 · 34.5K reputationPosted Jan 18, 2013, 1:51 AM EST
Cancelling the background operation will cancel the progress bar update also.
1) On your background worker component, make a call to CancelAsync();
2) The above call will set the CancellationPending property true.
3) You can check this property to stop the background work and there by your progress update also...