Turning off Bell

  • Thread starter Thread starter WizyDig
  • Start date Start date
W

WizyDig

I've looked every where for this answer and it seems so simple of a
question. How do you disable the bell that dings when you press enter
in a .NET windows app text box?

Wiz
 
WizyDig said:
How do you disable the bell that dings when you press enter in a .NET
windows app text box?

Add this handler to your text box' KeyPress event:

private void textbox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r')
e.Handeled = true;
}

Petter
 
Hey thanks Peter. That answer makes sense they alarm goes off to
indicate you pressed enter and you have to acknowledge you are handling
the press enter event. The documentation on the alarm is very sparse.

-Wiz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top