Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel a process
Message
 
 
To
19/06/2003 17:12:56
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00801951
Message ID:
00801994
Views:
7
Hi Mathew,

It depends on the process. If, for instance, you're running scan loop, you can use this idea:
lcPrevEsc = on('escape')
lcSetEsc = set('escape')
private plStop
on escape plStop = messagebox('Do you want to Cancel the process?',36, 'Cancel') = 6
plStop = .f.
scan
  if m.plStop
     exit
  endif
...
endscan
* restore environment
>Hi All,
>
>How would I write code to cancel a process when I press the ESC Key? I tried putting the code inside the KeyPress event of a command button, it doesn't work the way I wanted. How could I replace VFP message with my own? TIA
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform