I notice that Select All (Ctrl+A) does not work in a textbox on a form. Is
there anything I am missing to set? The KeyPreview on the form is off.
Ctrl+C and Ctrl+V works.
I was wondering why this wasn't build into the TextBox control myself,
but anyway, this should work:
Create this handler and hook it into all of your TextBox.KeyPress
events
private void SelectAll(object sender, KeyPressEventArgs e)
{
if ((System.Windows.Forms.Control.ModifierKeys ==
Keys.Control) && (e.KeyChar == (char)Keys.A))
((TextBox)sender).SelectAll();
}
Not sure this is the best way to accomplish what you want but it
should work.