My TextBox with Validate Option






1.48/5 (6 votes)
Nov 8, 2006

21460

453
Special Text Box control with functionality of validating and controlling handled text data
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
M3MTextBox1 =New M3M_TextBox.M3MTextBox
' this message text used when msg mode set to MsgBox mode
M3MTextBox1.ErrMessage = ""
M3MTextBox1.ErrorMessage = M3M_TextBox.ErrMsgType.IconM3MTextBox1.InformBackColor = System.Drawing.Color.LightGrayM3MTextBox1.InformForeColor = System.Drawing.Color.WheatM3MTextBox1.Location = New System.Drawing.Point(148, 64)M3MTextBox1.Name = "M3MTextBox1"M3MTextBox1.ReadyRegEx = M3M_TextBox.AvilableRegularExpression.CustomM3MTextBox1.RequiredBackColor = System.Drawing.Color.RedM3MTextBox1.RequiredForeColor = System.Drawing.Color.YellowM3MTextBox1.Size = New System.Drawing.Size(126, 20)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.