>>>>In many application, pressing Esc is quitting the form.
>>>>
>>>>What's the best way to handle that in Visual FoxPro?
>>>
>>>in most of our forms we have cancel command buttons and by setting the cancel property of the button to .t. esc will execute the code in the click event of the button.
>>
>>If I don't have a cancel button, I guess I can put one there which is not visible to obtain the same behavior.
>>
>>Thanks.
>
>ON ESCAPE ThisForm.Release() ?
From the help:
Visual FoxPro doesn’t execute an ON ESCAPE routine if SET ESCAPE is OFF.
In my case, I have SET ESCAPE OFF, so this won't help.