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.