• Advertisement
Sign in to follow this  

C# unnecessary noises

This topic is 4174 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
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