Validating edit control

(Note: A custom control called Text Plus incorporates this very functionality is available from website.Check the Extras link on the Tutorials page to learn more.)The Masked Edit control is an "Active X" control that must be added to the toolbox via the Components dialog box, as shown below.The Masked Edit control provides restricted data input as well as formatted data output.This control supplies visual cues about the type of data being entered or displayed.

However, for the msk Date control, where the Prompt Include property is set to True, a special technique is required.

TRANSPARENCY: Think of it this way: The control rectangle is filled using the BRUSH, then the text is drawn on top using a background and foreground color.

So, to make the entire control transparent, you need to use the above Set Bk Mode command, and also set the controls brush to the same brush you have used to draw the window itself.

For these types of numeric values, you are better off using the standard Text Box control and monitoring the user's input "manually" with the Key Press event.

Another option would be to use (or write your own) custom control to incorporate this functionality.

Search for validating edit control:

validating edit control-33validating edit control-78validating edit control-49

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating edit control”

  1. This is the successor to the widely used Jakarta Commons Http Client 3.1. Apache XML Graphics Commons is a library that consists of several reusable components used by Apache Batik and Apache FOP.

  2. Thankѕ so much fߋr tһe professional ɑnd sensible guide. Hey there just wanteԁ to give yoou a quick heads uρ. Iѕ there any wɑy you can remove people from tһat service?