Click here to Skip to main content
Licence CPOL
First Posted 22 Nov 2005
Views 26,475
Downloads 359
Bookmarked 8 times

A Formatted Text Box

By | 22 Nov 2005 | Article
A formatted textbox control for VB.

Sample Image - formatedTextBox.jpg

Introduction

I designed a text box control while I worked in Visual Basic 6.0. I found it very useful as it uses a very good validation logic. Developers can specify the criteria of validation and the text box will follow the criteria.

Description

It has all the properties as a standard text box. It has some additional properties. They are as follows...

  • AllowedChar: This property will force the validation logic to allow the characters specified here.
  • IlligalChar: This property will force the validation logic not to allow the characters specified here. IlligalChar has more precedence than AllowedChar.
  • Format: User can specify a pre-defined format for the text box. The available choices are as follows..
    • fmtText: Any text is allowed.
    • fmtAlphabetic: Only alphabets are allowed.
    • fmtAlphaNumeric: Only alphabets and numeric characters are allowed.
    • fmtUnsignedNumeric: Only unsigned numbers are allowed.
    • fmtSignedNumeric: Only signed numbers are allowed.
    • fmtUnsignedFloat: Only unsigned float is allowed.
    • fmtSignedFloat: Only signed float is allowed.
  • TextCase: User can specify the text case. The options are as follows:
    • Normal
    • Sentence
    • lowercase
    • UPPERCASE
    • TitleCase
    • tOGGLEcASE

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

H. S. Masud

Software Developer (Senior)
KAZ Software Limited
Bangladesh Bangladesh

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionNice. Maybe try do add Date(Time) mask ? Pinmembermarcin.rawicki22:05 30 Nov '05  

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.

Permalink | Advertise | Privacy | Mobile
Web03 | 2.5.120517.1 | Last Updated 23 Nov 2005
Article Copyright 2005 by H. S. Masud
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid