JL.
JL.

Reputation: 81382

Winforms: Backgroundworker on abort method?

Is there an event for onAbort for the backgroundworker control?

Upvotes: 0

Views: 120

Answers (2)

Matthieu
Matthieu

Reputation: 114

there is no specific event for "Cancel event".

You really should look at the MSDN documentation: http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.runworkercompleted.aspx

Upvotes: 0

djdd87
djdd87

Reputation: 68516

I don't believe so. When you call CancelAsync on the BackgroundWorker you need to handle the cancellation yourself. This then gets passed through to the RunWorkerCompleted event, however you can tell that it was cancelled through e.Cancelled.

Upvotes: 2

Related Questions