TextBox, under
Focus[
^] event doesn't delete the text inside it. It just changes the focus from other controls, to this one.
Secondly, to select entire text inside the TextBox, you can use the Selection (
SelectionStart[
^] and
SelectionLength[
^]) properties, to enter the characters that you want to select in the current selection; read more on MSDN links. Since you want to select all of them, try this,
AltText.Focus();
AltTxt.SelectionStart = 0;
AtlTxt.SelectionLength = textbox.Text.Length;
Above code would select the text from the control when you're inside it. There is no code to delete it, so it won't delete anything from the TextBox.