>>You can use the GotFocus and when calling a setfocus also issue a NODEFAULT.
>
>Could you give some examples where/why NODEFAULT should be used. I'm also new to VFP>3.
>
>Jukka Salminen
Jukka,
NODEFAULT prevents the VFP default behavior from occuring. For example, in the QueryUnload the VFP default behavior is to destroy the form. If you don't want the form destroyed you must issue NODEFAULT.
In the GotFocus the default behavior is to set focus to the object, if you don't want focus there you need to issue a NODEFAULT. Why is it needed? Because the VFP default behavior occurs after your code. So in the GotFocus example, your code would set focus to some other control, but then VFP would set focus to the current one after your focus move. This would make it appear like your SetFocus call was ignored when, in fact, it was not ignored just overridden after.