Click here to Skip to main content
Licence 
First Posted 7 Nov 2006
Views 13,829
Bookmarked 16 times

My TextBox with Validate Option

By | 7 Nov 2006 | Article
Special Text Box control with functionality of validating and controlling handled text data

Sample Image - M3MTextBox.jpg

Introduction

The M3M M3MTextBox control specially designed as one most required control in windows application development where we take more times in validating entered data into normal .net textbox with if statements, with different techniques like coloring error, side icon or message box. Also this control uses regular expressions as validation test.

Sample Code

In the next code snap snap shows how we can use this control throug our code

 <FONT size=2>
M3MTextBox1 = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> M3M_TextBox.M3MTextBox</FONT>
' this message text used when msg mode set to MsgBox mode
<FONT size=2>M3MTextBox1.ErrMessage = </FONT><FONT color=#800000 size=2>""
</FONT><FONT size=2>M3MTextBox1.ErrorMessage = M3M_TextBox.ErrMsgType.Icon
</FONT><FONT size=2>M3MTextBox1.InformBackColor = System.Drawing.Color.LightGray
</FONT><FONT size=2>M3MTextBox1.InformForeColor = System.Drawing.Color.Wheat
</FONT><FONT size=2>M3MTextBox1.Location = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> System.Drawing.Point(148, 64)
</FONT><FONT size=2>M3MTextBox1.Name = </FONT><FONT color=#800000 size=2>"M3MTextBox1"
</FONT><FONT size=2>M3MTextBox1.ReadyRegEx = M3M_TextBox.AvilableRegularExpression.Custom
</FONT><FONT size=2>M3MTextBox1.RequiredBackColor = System.Drawing.Color.Red
</FONT><FONT size=2>M3MTextBox1.RequiredForeColor = System.Drawing.Color.Yellow
</FONT><FONT size=2>M3MTextBox1.Size = </FONT><FONT color=#0000ff size=2>New</FONT><FONT size=2> System.Drawing.Size(126, 20)
</FONT><FONT size=2>M3MTextBox1.TabIndex = 0

 

also control trigger special event when error accrue Called  ErrorRasied in case if we want take special megerments when error happen in user entered data.

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

Mohm'ed Melhem

Software Developer (Senior)

Palestinian Territory (Occupied) Palestinian Territory (Occupied)

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
GeneralMy vote of 5 PinmemberHeaven20209:03 3 Nov '10  

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
Web04 | 2.5.120517.1 | Last Updated 8 Nov 2006
Article Copyright 2006 by Mohm'ed Melhem
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid