Selecionar TextBox – VB6
06Nov08
Para selecionar o conteudo de um TextBox quando receber focu, basta utilizar o codigo abaixo:
Rotina (colocar em um Modulo)
Public Sub Seleciona_Texto(txtTexto As TextBox)
txtTexto.SelStart = 0
txtTexto.SelLength = Len(txtTexto.Text)
End Sub
Evento GotFocus
Private Sub Text1_GotFocus()
Seleciona_Texto Text1
End Sub
flw
Filed under: Visual Basic | Leave a Comment
Tags: Basic, conteudo, evento, focus, selecionar, textbox, Vb, Vb6, Visual

No Responses Yet to “Selecionar TextBox – VB6”