How to cancel the progressbar in backgroundworker when clicking the cancel button . using c#.net?
How to cancel the progressbar in backgroundworker when clicking the cancel button . using c#.net?
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.
Sivaraman DhamodaranPosted Jan 18, 2013, 6:51 AM
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...