Solved

Preventing the BEEP with MaskEdit

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

22 Experts available now in Live!

Get 1:1 Help Now