Click here to Skip to main content
11,649,406 members (80,486 online)
Click here to Skip to main content

VB.NET Maskedbox Control - Final Release

, 17 Jan 2003 152.7K 1.3K 30
Rate this:
Please Sign up or sign in to vote.
A very useful maskedbox control using vb.net

Sample Image - MaskedBox_Control.jpg

Introduction

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.

Details

  • The "#" character in the mask is used for digit only
  • The "&" character accepts letter or digit
  • Supported mask symbols are "-", ".", ",", "/", "\", ":"

Using Component

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

Ex. ##.###.####-###.###/###

History

  • 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 SetTexthas 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 !

Comments

Any comments ? Email me at pdvtech@terra.com.br. Visit my business site at www.pdvtech.com.br.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

RicardoPDV
Web Developer
Brazil Brazil
Im a 33 years old and work developing applications since 14 years old

COBOL, my first language (i love)
BASIC, i born know

Visual Basic Rock's

You may also be interested in...

Comments and Discussions

 
GeneralGreat Help - Thanks Pin
mbusfield26-Nov-06 4:14
membermbusfield26-Nov-06 4:14 
GeneralSuggested enhancements Pin
VBProEd31-Dec-05 8:45
memberVBProEd31-Dec-05 8:45 
JokeRe: Suggested enhancements Pin
RicardoPDV3-Jan-06 1:45
memberRicardoPDV3-Jan-06 1:45 
Generalmiguelfantastic Pin
miguelfantastic27-May-05 13:03
membermiguelfantastic27-May-05 13:03 
GeneralProblem in Using this Control Pin
namasteall20001-Oct-04 4:21
membernamasteall20001-Oct-04 4:21 
GeneralBackspace Bug Pin
AnAverageJoe9-Jun-04 5:54
memberAnAverageJoe9-Jun-04 5:54 
GeneralRe: Backspace Bug Pin
MrGTI1-Oct-04 4:32
memberMrGTI1-Oct-04 4:32 
GeneralRe: Backspace Bug Pin
buffbuh28-Mar-07 12:54
memberbuffbuh28-Mar-07 12:54 
GeneralAbsolutely Clueless.... Pin
TheKanuck27-May-04 3:02
memberTheKanuck27-May-04 3:02 
GeneralRe: Absolutely Clueless.... Pin
Xpto00129-Oct-04 18:24
memberXpto00129-Oct-04 18:24 
try this:
http://www.codeproject.com/useritems/MaskedTextBox.asp[^]
GeneralPoor Control Load Pin
MrGTI23-Sep-03 4:30
memberMrGTI23-Sep-03 4:30 
GeneralRe: Poor Control Load Pin
namasteall20001-Oct-04 4:13
membernamasteall20001-Oct-04 4:13 
GeneralBUG Pin
balu_vee14-Aug-03 3:34
memberbalu_vee14-Aug-03 3:34 
GeneralRe: BUG Pin
namasteall20001-Oct-04 4:14
membernamasteall20001-Oct-04 4:14 
GeneralOption strict please Pin
nemaroller30-Apr-03 4:18
membernemaroller30-Apr-03 4:18 
GeneralRe: Option strict please Pin
namasteall20001-Oct-04 4:14
membernamasteall20001-Oct-04 4:14 
Questionsmall bug ??? Pin
zefrit22-Apr-03 7:13
memberzefrit22-Apr-03 7:13 
AnswerHelp me Pin
namasteall20001-Oct-04 4:19
membernamasteall20001-Oct-04 4:19 
GeneralSmall bug Pin
Richard Deeming20-Jan-03 3:18
memberRichard Deeming20-Jan-03 3:18 
GeneralRe: Small bug Pin
RicardoPDV20-Jan-03 5:50
memberRicardoPDV20-Jan-03 5:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150804.4 | Last Updated 18 Jan 2003
Article Copyright 2003 by RicardoPDV
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid