If you really need to handle the Ctrl+A, you wire key press event of text box to one event handler as shown below in form load.
textBox1.KeyPress += new KeyPressEventHandler(CommonKeyPress);
textBox2.KeyPress += new KeyPressEventHandler(CommonKeyPress);
Then your function below should work great !
private void CommonKeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\x1')
{
((TextBox)sender).SelectAll();
e.Handled = true;
}
}
Milind