Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OnKeyPress question
Message
General information
Forum:
Borland C++ Builder
Category:
C++ Builder Language
Title:
OnKeyPress question
Miscellaneous
Thread ID:
01021597
Message ID:
01021597
Views:
89
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.
Reply
Map
View

Click here to load this message in the networking platform