What's good way to stop a program?

  • Thread starter Thread starter Steve Roberts
  • Start date Start date
S

Steve Roberts

I have a program that moves lots of email to different folders. There are
rare occasions when I would like to stop the process. Is there a good way to
do this? Maybe a way to capture a keystroke or something?

Thanks

Steve
 
I usually put up a form, maybe with a progress bar control on it and a
button labeled Cancel. In the cmdCancel_Click() handler I set a Boolean
variable that is checked in the code loop. If True I cancel the loop.
 
Thanks. That worked great. Sometimes it's the easy things that are hard to
figure out!
 
Back
Top