Stop the ‘Ding’ when pressing Enter

It works for me:

private void textBox1_KeyDown(object sender, KeyEventArgs e)
{

    //Se apertou o enter
    if (e.KeyCode == Keys.Enter)
    {
        //enter key is down

        this.doSomething();

        e.Handled = true;
        e.SuppressKeyPress = true;

     }

 }

The SuppressKeyPress is the really trick. I hope that help you.

Leave a Comment