>I've made a custom textbox control that selects the next control when I press the ENTER key but the computer beeps everytime I hit enter, How can I avoid this beep?
>
>TIA,
>
>Enmanuel
Hi Enmanuel,
put this code into your custom texbox control :
protected override void OnKeyPress(KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
e.Handled = true;
else
base.OnKeyPress(e);
}
Please let me know if it works :-)
Handi Rusli
"Treat people with respect and courtesy, and one will be blessed. Complete task heartily, with best effort and responsibility, and one can achieve the greatest."