VB.NET does not have a masked texbox and it's very important for user input. So I have made it myself because the components I have found is not good enough for me.
- The "#" character in the mask is used for digit only
- The "&" character accepts letter or digit
- Supported mask symbols are "-", ".", ",", "/", "\", ":"
The use of this component is very simple. You have to select the toolbox panel, right click in the windows forms section and select customize toolbox.
Select .NET framework components, then click browse and select maskedbox.dll in the download path. The maskedbox component will appear at the end of windows forms panel. Now select the component and drop it on a form.
Then set the mask property with any combination of valid characters
- Initial - I fixed a bug where the space key is not recognized. This version inherits a textbox component to publish all features of the textbox plus maskedbox
- 20-jan-2003 Fixes - Function keys now are not handled by control. They cause an invalid character in between the text. The function
SetText has been created. Programatically changing the text value in control din't change the masked text, so I created this function where the parameter is a string to fill the text (with no mask). If the text is "", then the text and mask is cleared with a empty mask.
- 21-jan-2003 - The Final Release!!! I hope! Accept all characters and function keys. The delete key is working now !
Any comments ? Email me at firstname.lastname@example.org. Visit my business site at www.pdvtech.com.br.