Solved

Preventing the BEEP with MaskEdit

Posted on 1998-10-04
3
153 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

809 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