>Hello everyone.
>
>Does anyone knows how to accomplish this? :
>Selects all the text when the control gets the focus.
>
>I am using a a text control and I would like to select all the text when the control gets the focus.
>In VFP is done by setting the format property of the text control to 'F'.
>
>Thanks,
>Sergio
This way:
Private Sub Text1_GotFocus()
With Text1
.SelStart = 0
.SelLength = Len(.Text)
End With
End Sub
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com