Sounds in a text box

  • Thread starter Thread starter Harry J. Smith
  • Start date Start date
H

Harry J. Smith

Is there a way to disable sounds/beeper in a text box? In particular I don't want to hear a beep when I hit the PgUp key in an empty
text box.

-Harry
 
The following code works for me to disable the ENTER beep in a text box
(it's in C# but should translate to VB.NET easily enough):

private void textBox2_KeyPress(object sender,
System.Windows.Forms.KeyPressEventArgs e) {
if (e.KeyChar == '\r') e.Handled = true;
}

Chris Jobson
 

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