How do you auto highlight text in a textbox control when the control gains focus.
In Windows Forms and WPF:
textbox.SelectionStart = 0; textbox.SelectionLength = textbox.Text.Length;
2.1m questions
2.1m answers
60 comments
57.0k users