When I enter a vb.net textbox, if there is data in it, I want it to be highlighted. I looked around and couldn't find a property that would do this so I do the following:
I built a little subroutine that does the highlighting and then call it from the ENTER and CLICK event on each text box.
Private Sub fixFocus(sender As Object)
sender.SelectionStart = 0
sender.SelectionLength = Len(sender.Text)
End Sub
Private Sub txtCompAddress_Click(sender As Object, e As System.EventArgs) Handles txtCompAddress.Click
fixFocus(sender)
End Sub
Private Sub txtCompAddress_Enter(sender As Object, e As System.EventArgs) Handles txtCompAddress.Enter
fixFocus(sender)
End Sub