Hello,

I have some background workers in my application and I'm having trouble trying to cancel them, so far I have the following...

Code:
If Backgroundworker1.IsBusy Then
            Backgroundworker1.CancelAsync()
            Backgroundworker1 = Nothing
        End If

If Backgroundworker2.IsBusy Then
            Backgroundworker2.CancelAsync()
            Backgroundworker2 = Nothing
        End If

If Backgroundworker3.IsBusy Then
            Backgroundworker3.CancelAsync()
            Backgroundworker3 = Nothing
        End If
Is there a way to kill all background workers in one go? Also, I have noticed that sometimes when I kill the background worker it still completes.

Would you recommend .dispose?

Many thanks.