Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OnKeyPress question
Message
Information générale
Forum:
Borland C++ Builder
Catégorie:
Langage C++ Builder
Titre:
OnKeyPress question
Divers
Thread ID:
01021597
Message ID:
01021597
Vues:
90
My Borland C++ skills are a little rusty and I am working on a Borland C++ project.
I am working on some OnKeyPress code and want to know how I can prevent the character typed to be displayed if it doesn't meet my criteria. Considder the code below:
if (Key != 'E')
{
  Application->MessageBox("E is the only valid input", "Information",MB_OK | MB_ICONINFORMATION);
  // What do I put here to prevent the character typed to be displayed in the Edit box?
}
Thanks,
Einar

UPDATE:
5 minutes later I thought about this. Any objections?
if (Key != 'E')
{
  Application->MessageBox("E is the only valid input", "Information",MB_OK | MB_ICONINFORMATION);
  Key = NULL;
}
Semper ubi sub ubi.
Répondre
Fil
Voir

Click here to load this message in the networking platform