If SET ESCAPE is OFF and you do not have a CommandButton on the form that is set to Cancel = .t., this ought to work in the form.KeyPress method:
if ( nKeyCode = 27 )
nodefaultthis.EscapeHandler()
endif
>I'm the lurker :) How would you specify on escape in Form.KeyPreview? I'm thinking about adding new method in our thermometer class and I want to call this method on escape.