Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

A Formatted Text Box

0.00/5 (No votes)
23 Nov 2005 1  
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 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