C# unnecessary noises

Started by
5 comments, last by paulecoyote 17 years, 7 months ago
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]
A JPEG is worth a thousand and twenty four DWORD's. ;)
Note: Due to vacationing my website will not be updated till late-August. Of course I still have internet, but who wants to program during a vacation?
Advertisement
The video link is asking me for a password.
OMG I'm sorry.

clicky

PLEEEASE tell me this works.
A JPEG is worth a thousand and twenty four DWORD's. ;)
Note: Due to vacationing my website will not be updated till late-August. Of course I still have internet, but who wants to program during a vacation?
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.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
I believe KeyPressEventArgs contains a .Handled member, which lets your event handler indicate that the event was handled but your code.
e.Handled = true


Thanks a bunch to both ItsDoh and paulecoyote for helping out!
A JPEG is worth a thousand and twenty four DWORD's. ;)
Note: Due to vacationing my website will not be updated till late-August. Of course I still have internet, but who wants to program during a vacation?
Props to you for updating the thread with your progress [smile]
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.

This topic is closed to new replies.

Advertisement