I have a backgroundworker component on my form...
when i press the start button i call the RunWorkerAsync() method, and when I press the cancel button i call the CancelAsync() method.
The thing is that even though i press the cancel button the thread keeps working(also the WorkerSupportsCancellation property is set to true). Why is that

Also if i try to start the process immediately after being "cancelled" it gives me the error:
This BackgroundWorker is currently busy and cannot run multiple tasks concurrently.

Any suggestions


Re: Windows Forms General Background worker component question

Andrej Tozon


you'll have to implement process cancellation for yourself; it's not done by backgroundworker itsel - it just provides the notification methods/properties for you to use and implement. See MSDN's code sample on this page for process cancellation example.