highlite all text in a textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a faster, better, way to highlite all the text in a textbox control
when a user enter that control than the following code?

If (sender.Text.Length > 0) Then
sender.SelectionStart = 0
sender.SelectionLength = sender.Text.Length
sender.Select()
End If

B
 
Hi,

TextBox1.SelectAll()



Ken

-------------------

Is there a faster, better, way to highlite all the text in a textbox control
when a user enter that control than the following code?

If (sender.Text.Length > 0) Then
sender.SelectionStart = 0
sender.SelectionLength = sender.Text.Length
sender.Select()
End If

B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top