Any ideas how to stop the system bell from sounding when CTRL-A is used to select text in a Winforms application?
Here\'s the problem. Create a
@H7O solution is good, but I improved it a bit for multiply TextBox components on the form.
private void textBox_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { ((TextBox)sender).SelectAll(); e.SuppressKeyPress = true; } }