>The SelectOnEntry should work if you have 5.0 or higher....but there must be something else wrong because the Format K should work also, even if SelectOnEntry is .F. the Format K should highlight the information in field. What type of control is this? Are you loading anything into the keyboard buffer before or after the SetFocus? Does the information get highlighed if you tab into the field instead of doing SetFocus?
>
TextBox behavior when you Tab into the box differs from the behavior if you mouse-click into the box - I find I need to add code to the GotFocus event to adjust the SelStart and SelLength properties and prevent the native VFP action with a NODEFAULT to make them work identically. The subclass of a typical numeric textbox that I want to give this behavior to looks like:
PROCEDURE GotFocus()
LOCAL uDoDefaultResult
uDoDefaultResult = DODEFAULT()
WITH this
.SelStart = 0
.SelLength = 1000
ENDWITH
NODEFAULT
RETURN uDoDefaultResult
ENDPROC