I\'m asking the question already asked (and even answered) here: Why are some textboxes not accepting Control + A shortcut to select all by default
But that answer d
This is my code, it is working fine
private void mainSimPlus_KeyDown(object sender, KeyEventArgs e)
{
e.Handled = true;
if (e.Control == true && e.KeyCode == Keys.A)
{
if (SelectAllTextBox(txt1))
return;
if (SelectAllTextBox(txt2))
return;
}
}
private bool SelectAllTextBox(TextBox txt)
{
if (txt.Focused)
{
txt.SelectAll();
return true;
}
else
return false;
}