If I have a backgroundWorker that has executed like this:
backgroundWorker2->RunWorkerAsync();
If I now want to cancel this, I have put this line of code at the very last line in the _DoWork event of the backgroundWorker2.
I am not sure if that works or if it is the right way to do it.
backgroundWorker2->CancelAsync();
The thing is that I use the backgroundworker for 2 things. First I will try one thing in the backgroundworker and then I will try another thing with the same backgroundworker.
So the backgroundworker needs to be "Finished" before I execute the backgroundworker again the second time.
Thank you...