Let say that you want to prevent the user from typing the letter "A" in a textbox. You would write the following code in the textbox KeyPress() event:
IF Upper(Chr(nKeyCode)) = "A"
NODEFAULT
ENDIF
If you did not include NODEFAULT in the IF block, VFP would have executed it's default behaviour and a key press and would have displayed the character "A" in that case.
HTH
>I have notice the nodefault option in define class command, what the 'nodefault' affect? I don't understand what the MSDN library say.