Textbox::GotFocus() This.SelStart = 3 NODEFAULTThe reason you have to do it like this is because, by default, the native VFP method code ( if there is any ) runs after any of your custom code. The native behavior of GotFocus() is to reset SelStart and SelLen. So you need to have the native behavior occur before you set these properies and not after.