I am trying to get a TextBox
to highlight all of its text when clicked, but the text only stays highlighted for a fraction of a second, then the cursor appears again. I have tried using the TextBox.Enter
, TextBox.MouseClick
, and TextBox.GotFocus
events but I have the same issue. I am using a Windows Form application.
private void TextBox_Enter(object sender, EventArgs e) {
SelectAll();
}