0

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?

Peter O.
  • 32,158
  • 14
  • 82
  • 96
dhyabi
  • 329
  • 2
  • 13
  • possible duplicate of [Stop the Bell on CTRL-A (WinForms)](http://stackoverflow.com/questions/225711/stop-the-bell-on-ctrl-a-winforms) – nemesv Nov 25 '12 at 17:20

1 Answers1

1

Do try this:

       private void textBox1_keyDown(object sender, KeyEventArgs e)
        {
            if (e.Control & e.KeyCode == Keys.A)
                textBox1.SelectAll();
        }
sajanyamaha
  • 3,119
  • 2
  • 26
  • 44