Hi!
But you can check also MDOWN() and so on... Like following:
if lastkey() = 27 and MCOL(THISFORM.name)>=THISFORM.cmdCancel.left AND ;
MCOL(THISFORM.name)<=THISFORM.cmdCancel.left + ;
THISFORM.cmdCancel.width AND ;
MROW(THISFORM.name)>=THISFORM.cmdCancel.top AND ;
MROW(THISFORM.name)<=THISFORM.cmdCancel.top + ;
THISFORM.cmdCancel.height
RETURN .t.
else
validation code goes here ;) (not in Hollywod ;))))
endif
I wrote about lastkey() because all my base form releases themselves when
user press ESC.
Have a happy day
Vladimir Shevchenko
> Yes, but the user clicks on a Cancel button, so the last pressed key is
not
> Esc. :)
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer