Here is the situation. I have a thread that gets started with the click of a button. It then works for approx 2 min (give or take quite a bit) and then finishes, updating the UI and all along the way. It is quite nice. Now I have decided to add a "Cancel" button to the mix. My question would be what is the best approach to stop a thread from the outside? What methods are best to avoid completely? What resources can I look into myself to get some more knowledge on the topic.
One other piece of info. The program was not written by me, I just "inherited" it, and am now trying to expand it's functionality in small ways to make it more user friendly.
EDIT: Working with VS2008 and .NET 3.5