Makso, I don't think that asynchronous call will solve your problem. The only solution you have is to send a reference of that asynchronous thread back to the main thread, a very very dirty solution.
What I mean is setting up a form level variable
And in your asynchronous method just set it like this.
this.asynchOperation = System.Threading.Thread.CurrentThread;
And then in your btn_StopProcess_Click()
Also don't forget to wrap your asynchronous operation in try catch and
But i will strictly advise against this solution. Aborting a ThreadPool
thread is not an idea, anyone will favor. It's reported to be recreated anyway. I myself has aborted as an experiment about 70 threads and everytime i got back a thread with managedID 6. I haven't confirmed the unmanaged status, but at least it was recreating these threads.
A better solution would be using Thread