Reputation: 329
In Desktop C# Form or window I have a search box which is TextBox, when user try to highlight the text Using Ctrl + A, The system release sound. Is there any thing that make the textbox control accept Ctrl + A?
Upvotes: 0
Views: 107
Reputation: 3198
Do try this:
private void textBox1_keyDown(object sender, KeyEventArgs e)
{
if (e.Control & e.KeyCode == Keys.A)
textBox1.SelectAll();
}
Upvotes: 1