Windows Control: Masked Text Box |
|
Microsoft Visual Basic 6.0 provides a convenient text box that allows you to assist the user with text entry in a text box. This control is called MaskEdit. To use this control, you must explicitly add it as a COM Component of the Microsoft Masked Edit Control. |
The most important property of a MaskEdit control, which sets it apart from the (traditional) text box control, is its ability to control what the user can and cannot enter in the text side. To configure this text, you have two alternatives. The Format property in the Properties window provides a list of available masks you can use: If none of the masks in the list suits you, you still have two alternatives. You can type your own desired mask in the Format field. The characters you can use are:
Besides these letters, an empty space and/or a special character should be used to separate the sections of the string. You should use an appropriate character as defined in the Regional Settings or the Customize Regional Options of the Control Panel: Based on this, in US English, the character used to separate the date sections is the forward slash if you use a short date. In US English, the comma is used to separate the sections of a long date.
|
|
||
Home | Copyright © 2007-2013, FunctionX | |
|