Click here to Skip to main content
6,634,665 members and growing! (15,844 online)
Email Password   helpLost your password?
Languages » C / C++ Language » General     Intermediate

VB.NET Maskedbox Control - Final Release

By RicardoPDV

A very useful maskedbox control using vb.net
C#, VB.NET 1.0, Win2K, WinXP, Dev
Posted:17 Jan 2003
Views:122,910
Bookmarked:25 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
23 votes for this article.
Popularity: 5.29 Rating: 3.88 out of 5
2 votes, 8.7%
1
2 votes, 8.7%
2
2 votes, 8.7%
3
8 votes, 34.8%
4
9 votes, 39.1%
5

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

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

About the Author

RicardoPDV


Member
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

Occupation: Web Developer
Location: Brazil Brazil

Other popular C / C++ Language articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 20 of 20 (Total in Forum: 20) (Refresh)FirstPrevNext
GeneralGreat Help - Thanks Pinmembermbusfield5:14 26 Nov '06  
GeneralSuggested enhancements PinmemberVBProEd9:45 31 Dec '05  
JokeRe: Suggested enhancements PinmemberRicardoPDV2:45 3 Jan '06  
Generalmiguelfantastic Pinmembermiguelfantastic14:03 27 May '05  
GeneralProblem in Using this Control Pinmembernamasteall20005:21 1 Oct '04  
GeneralBackspace Bug PinmemberAnAverageJoe6:54 9 Jun '04  
GeneralRe: Backspace Bug PinmemberMrGTI5:32 1 Oct '04  
GeneralRe: Backspace Bug Pinmemberbuffbuh13:54 28 Mar '07  
GeneralAbsolutely Clueless.... PinmemberTheKanuck4:02 27 May '04  
GeneralRe: Absolutely Clueless.... PinmemberXpto00119:24 29 Oct '04  
GeneralPoor Control Load PinmemberMrGTI5:30 23 Sep '03  
GeneralRe: Poor Control Load Pinmembernamasteall20005:13 1 Oct '04  
GeneralBUG Pinmemberbalu_vee4:34 14 Aug '03  
GeneralRe: BUG Pinmembernamasteall20005:14 1 Oct '04  
GeneralOption strict please Pinmembernemaroller5:18 30 Apr '03  
GeneralRe: Option strict please Pinmembernamasteall20005:14 1 Oct '04  
Generalsmall bug ??? Pinmemberzefrit8:13 22 Apr '03  
GeneralHelp me Pinmembernamasteall20005:19 1 Oct '04  
GeneralSmall bug PinmemberRichard Deeming4:18 20 Jan '03  
GeneralRe: Small bug PinmemberRicardoPDV6:50 20 Jan '03  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 17 Jan 2003
Editor: Nishant Sivakumar
Copyright 2003 by RicardoPDV
Everything else Copyright © CodeProject, 1999-2009
Web21 | Advertise on the Code Project