Solved

Preventing the BEEP with MaskEdit

Posted on 1998-10-04
3
150 Views
Last Modified: 2012-05-04
How can I prevent the BEEP when entering a alpha char in a mask edit accepting only digits ?
0
Comment
Question by:skylinka
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 50 total points
ID: 1341725
if not key in ['0'..'9'] then
  key := #0;

Regards,
Viktor Ivanov
0
 

Author Comment

by:skylinka
ID: 1341726
Thank you. It works.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1341727
you could also add the backspace key so you can delete the numbers if you want... This is the code to try out...

if not key in ['0'..'9', '.', #8] then
  key := #0;

Regards,
Viktor Ivanov
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now