Solved

Preventing the BEEP with MaskEdit

Posted on 1998-10-04
3
155 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

739 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