Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Beep when pressing ENTER
Message
De
19/12/2007 11:40:22
Handi Rusli
PT. Alam Sumbervita
Jakarta, Indonésie
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01275860
Message ID:
01276628
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>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."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform