Jump to content
  • Advertisement
Sign in to follow this  
geekalert

C# unnecessary noises

This topic is 4444 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

well, i was wondering how you would fix this particular problem: every time I press enter, the text box makes a beeping "invalid input noise". Eventually this gets really annoying for the user, and I was wondering how to fix this so it is silent. also, if a picture is worth 1000 words, how much is a video worth? ;) clicky the source language is C#, and the key handling code goes as such:
private void FormMain_KeyPress(object sender, KeyPressEventArgs e)
{
    if (e.KeyChar == '\r') buttonEnter_Click(sender, e);
}
Both FormMain and textBoxInput are linked to this function. Thanks a bunch in advance! edit: make sure you can hear the sound in the vid. [Edited by - geekalert on September 14, 2006 8:54:01 PM]

Share this post


Link to post
Share on other sites
Advertisement
You set the default button for the form as equals right? The default button will get called when you press enter. Unless your text box has been set to allow enter.

Share this post


Link to post
Share on other sites
I believe KeyPressEventArgs contains a .Handled member, which lets your event handler indicate that the event was handled but your code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!