⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.vb

📁 textbox information try to validation of your text box
💻 VB
字号:
Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Panel1 As System.Windows.Forms.Panel
    Friend WithEvents Panel2 As System.Windows.Forms.Panel
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents TextBox1 As glblControls.TextBox
    Friend WithEvents TextBox2 As glblControls.TextBox
    Friend WithEvents TextBox3 As glblControls.TextBox
    Friend WithEvents TextBox4 As glblControls.TextBox
    Friend WithEvents TextBox5 As glblControls.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents mText1 As glblControls.MaskedTextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents mText2 As glblControls.MaskedTextBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents mText3 As glblControls.MaskedTextBox
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.Panel1 = New System.Windows.Forms.Panel
        Me.Label1 = New System.Windows.Forms.Label
        Me.Panel2 = New System.Windows.Forms.Panel
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.mText3 = New glblControls.MaskedTextBox(Me.components)
        Me.Label9 = New System.Windows.Forms.Label
        Me.mText2 = New glblControls.MaskedTextBox(Me.components)
        Me.Label8 = New System.Windows.Forms.Label
        Me.mText1 = New glblControls.MaskedTextBox(Me.components)
        Me.Label7 = New System.Windows.Forms.Label
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button1 = New System.Windows.Forms.Button
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.TextBox5 = New glblControls.TextBox
        Me.TextBox4 = New glblControls.TextBox
        Me.TextBox3 = New glblControls.TextBox
        Me.TextBox2 = New glblControls.TextBox
        Me.TextBox1 = New glblControls.TextBox
        Me.Panel1.SuspendLayout()
        Me.Panel2.SuspendLayout()
        Me.SuspendLayout()
        '
        'Panel1
        '
        Me.Panel1.BackColor = System.Drawing.Color.SteelBlue
        Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Panel1.Controls.Add(Me.Label1)
        Me.Panel1.Location = New System.Drawing.Point(8, 8)
        Me.Panel1.Name = "Panel1"
        Me.Panel1.Size = New System.Drawing.Size(544, 40)
        Me.Panel1.TabIndex = 0
        '
        'Label1
        '
        Me.Label1.Font = New System.Drawing.Font("Verdana", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlLightLight
        Me.Label1.Location = New System.Drawing.Point(80, 8)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(448, 24)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "glblControls (TextBox, MaskedTextBox) TEST"
        '
        'Panel2
        '
        Me.Panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Panel2.Controls.Add(Me.Label11)
        Me.Panel2.Controls.Add(Me.Label10)
        Me.Panel2.Controls.Add(Me.mText3)
        Me.Panel2.Controls.Add(Me.Label9)
        Me.Panel2.Controls.Add(Me.mText2)
        Me.Panel2.Controls.Add(Me.Label8)
        Me.Panel2.Controls.Add(Me.mText1)
        Me.Panel2.Controls.Add(Me.Label7)
        Me.Panel2.Controls.Add(Me.Button2)
        Me.Panel2.Controls.Add(Me.Button1)
        Me.Panel2.Controls.Add(Me.Label6)
        Me.Panel2.Controls.Add(Me.Label5)
        Me.Panel2.Controls.Add(Me.Label4)
        Me.Panel2.Controls.Add(Me.Label3)
        Me.Panel2.Controls.Add(Me.Label2)
        Me.Panel2.Controls.Add(Me.TextBox5)
        Me.Panel2.Controls.Add(Me.TextBox4)
        Me.Panel2.Controls.Add(Me.TextBox3)
        Me.Panel2.Controls.Add(Me.TextBox2)
        Me.Panel2.Controls.Add(Me.TextBox1)
        Me.Panel2.Location = New System.Drawing.Point(8, 56)
        Me.Panel2.Name = "Panel2"
        Me.Panel2.Size = New System.Drawing.Size(544, 352)
        Me.Panel2.TabIndex = 1
        '
        'Label11
        '
        Me.Label11.ForeColor = System.Drawing.SystemColors.Desktop
        Me.Label11.Location = New System.Drawing.Point(8, 304)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(280, 16)
        Me.Label11.TabIndex = 19
        Me.Label11.Text = "&& = Letter, ! = Letter/Number, # = Number"
        Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label10
        '
        Me.Label10.Location = New System.Drawing.Point(72, 280)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(216, 16)
        Me.Label10.TabIndex = 18
        Me.Label10.Text = "Fix Format (S/&&&&&&/!!!/#)"
        Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'mText3
        '
        Me.mText3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.mText3.Location = New System.Drawing.Point(296, 272)
        Me.mText3.Mask = "!/&&&-!!!-#"
        Me.mText3.Name = "mText3"
        Me.mText3.Size = New System.Drawing.Size(200, 22)
        Me.mText3.TabIndex = 7
        Me.mText3.Text = "_/___-___-_"
        '
        'Label9
        '
        Me.Label9.Location = New System.Drawing.Point(64, 248)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(216, 16)
        Me.Label9.TabIndex = 16
        Me.Label9.Text = "Phone Number (US)"
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'mText2
        '
        Me.mText2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.mText2.Location = New System.Drawing.Point(296, 240)
        Me.mText2.Mask = "###-####-###"
        Me.mText2.Name = "mText2"
        Me.mText2.Size = New System.Drawing.Size(200, 22)
        Me.mText2.TabIndex = 6
        Me.mText2.Text = "___-____-___"
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(56, 216)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(224, 16)
        Me.Label8.TabIndex = 14
        Me.Label8.Text = "Masked for date format"
        Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'mText1
        '
        Me.mText1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.mText1.Location = New System.Drawing.Point(296, 208)
        Me.mText1.Mask = "!!:!!"
        Me.mText1.Name = "mText1"
        Me.mText1.Size = New System.Drawing.Size(200, 22)
        Me.mText1.TabIndex = 5
        Me.mText1.Text = "__:__"
        '
        'Label7
        '
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Font = New System.Drawing.Font("Verdana", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label7.ForeColor = System.Drawing.Color.RoyalBlue
        Me.Label7.Location = New System.Drawing.Point(16, 184)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(504, 16)
        Me.Label7.TabIndex = 12
        Me.Label7.Text = "This only requires property setting, Only 1 Line of code in Ok Button."
        '
        'Button2
        '
        Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.Button2.Location = New System.Drawing.Point(416, 312)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(112, 24)
        Me.Button2.TabIndex = 9
        Me.Button2.Text = "Close"
        '
        'Button1
        '
        Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
        Me.Button1.Location = New System.Drawing.Point(304, 312)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(104, 24)
        Me.Button1.TabIndex = 8
        Me.Button1.Text = "Ok"
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(48, 144)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(232, 16)
        Me.Label6.TabIndex = 9
        Me.Label6.Text = "Only numbers (includes ""."")"
        Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(152, 112)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(128, 16)
        Me.Label5.TabIndex = 8
        Me.Label5.Text = "Only alphabets"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(16, 80)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(264, 16)
        Me.Label4.TabIndex = 7
        Me.Label4.Text = "Invalid Characters (e.g. @#$%

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -