>Is there a way to tie the ESC key to the
>cancel button WITHOUT firing the valid()
>of individual controls?
>
>I can think of using the form.keypressed()
>method, or inserting extra codes ( checking
>lastkey()=27 ) into controls.valid() methods,
>but is there any neater solution?
You could set button's cancel property to true and move valid code to lostfocus, add :
if lastkey()#27
endif
Cetin