I'de watch out with LASTKEY() though.. 'cos some number appears for more than one letter... For exacmple. CTRL-H and BACKSPACE have the same LASTKEY(), but they don't have the same 'ShiftCtrlAlt' value. Much like 27 , which is enter I think, have some other key that corespond to it...
>Hi all,
>
>I'm trying to do a TextBox Class, in the TextBox Valid event i have
>
>
if lastkey() = 27
> return .T.
>endif
>---Here i create my Validation Method
>return This.Validation()
>
>Now i put in the Form this TextBox and in Valid event dodefault(), and in the validation Method my code to validate, and return .t. if ok or return .f. if not, but if the validation fails it goes to the next TextBox, and don't return to the original, any lights here?
>
>Thank's
>
>João Batista