Groups | Blog | Home
all groups > c# > november 2003 >

c# : Enter makes beep in textbox (how to remove ?)



Cybertof
11/4/2003 9:15:37 PM
Hello,

I want to change focus from one textbox to another next to an 'ENTER'
keypress.

But each time the user presses the ENTER key in a non multine textbox,
the systems beeps.

How to remove this beep ?


Regards,
Todd Bellamy
11/4/2003 9:38:42 PM
Try this in your TextBox's KeyPress event:

if (e.KeyChar == (char)13)
{
e.Handled = true;
}


Todd Bellamy
MCAD .NET

[quoted text, click to view]

Cybertof
11/4/2003 11:22:04 PM
Thanks Todd.


In article <C%Upb.139998$7B1.132482
@news04.bloor.is.net.cable.rogers.com>, toddbellamy@hotmail.com says...
[quoted text, click to view]
AddThis Social Bookmark Button