>The easiest way to do this is to make sure you have DOEVENTS sprinkled through your code to give your form control to handle the Cancel button or whatever. You then need a flag in the executing code to make sure to let the process know that it's been cancelled and exit out after the next step/task.
>
>Using a timer roughly has the same effect but is maybe a bit more work. In both cases you rely on the executing process yielding often enough to allow you to click the button. If you're stuck in the middle of some command though (like a long SQL command or report) this may not be possible.
I ended up using timers. This works great as I can click on the form to close it, stop the process, scroll the TextBox control log to see it, etc. We're hitting a Web Service and use that form for monitoring purposes. It goes every 5 seconds with the main method and I can increase the interval and such. So far, all the clicks I have done during a process have been processed ok.