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
>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