Anybody know how to prevent the ding sound from happening when the escape or
enter key is entered into a textbox? I need to catch the enter and escape
keys for processing.

I've the following event handler for on the Keydown event of the text box,
but I'm still getting the ding sound.

private void EditBoxKeyDown(object sender, System.Windows.Forms.KeyEventArgs
e)
{
if ( e.KeyCode == Keys.Enter )
{
/* do some processing */
e.Handled = true;
}
if ( e.KeyCode == Keys.Escape )
{
/* do some processing */
e.Handled = true;
}
}

Re: Preventing "ding!" on Esc or Enter in a textbox by hirf-spam-me-here

hirf-spam-me-here
Mon Nov 24 12:59:31 CST 2003

* "Nic L" <nlaunceford-at-eedinc-dot-com> scripsit:
> Anybody know how to prevent the ding sound from happening when the escape or
> enter key is entered into a textbox? I need to catch the enter and escape
> keys for processing.

<http://groups.google.com/groups?ie=UTF-8&q=group%3A*dotnet*+beep+textbox>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>