Public class maxTextBox inherits system.windows.Forms.TextBox
#Region "Windows Form Designer Generated Code"
Public Sub new () mybase.new ()
'This call is required for the Windows Form Designer. InitializeComponent ()
'Add any initialization after INITIALIZECOMPONENT ()
End Sub
'UserControl overrides Dispose to clean the component list. Protected overloads overrides sub dispose (byval disposing as boolean) ing disponation kiln (Components Is Nothing) Then components.dispose () end if endiffs) End sub
'Windows Form Designer Supply Private Components as System.comPonentModel.icontainer
'Note: The following procedure is necessary to use the Windows Form Designer to modify this process using the Windows Form Designer. 'Don't modify it using the code editor.
#End Region Private h As Integer Private m_max As Integer = 10 Public Property mlength () As Integer Get Return m_max End Get Set (ByVal Value As Integer) If Value> = 1 Then m_max = Value End If End Set End Property Public Function checkboolean () AS Boolean Dim Count As integer = system.text.Encoding.default.getBytecount (me.text) if count> = 10 THEN H = Me.Text.length Return True else Return False End If END FUNCTION