form2.vb

来自「Visual Basic .NET程序设计教程源代码」· VB 代码 · 共 193 行

VB
193
字号
Public Class search
    Inherits System.Windows.Forms.Form

#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    '窗体重写 dispose 以清理组件列表。
    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

    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    '注意: 以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
    Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
    Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
    Friend WithEvents TabPage3 As System.Windows.Forms.TabPage
    Friend WithEvents txtnm As System.Windows.Forms.TextBox
    Friend WithEvents txtaddrs As System.Windows.Forms.TextBox
    Friend WithEvents cb2 As System.Windows.Forms.ComboBox
    Friend WithEvents rb1 As System.Windows.Forms.RadioButton
    Friend WithEvents rb2 As System.Windows.Forms.RadioButton
    Friend WithEvents btnsch As System.Windows.Forms.Button
    Friend WithEvents dgresult As System.Windows.Forms.DataGrid
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.TabControl1 = New System.Windows.Forms.TabControl
        Me.TabPage1 = New System.Windows.Forms.TabPage
        Me.TabPage2 = New System.Windows.Forms.TabPage
        Me.TabPage3 = New System.Windows.Forms.TabPage
        Me.txtnm = New System.Windows.Forms.TextBox
        Me.txtaddrs = New System.Windows.Forms.TextBox
        Me.cb2 = New System.Windows.Forms.ComboBox
        Me.rb1 = New System.Windows.Forms.RadioButton
        Me.rb2 = New System.Windows.Forms.RadioButton
        Me.btnsch = New System.Windows.Forms.Button
        Me.dgresult = New System.Windows.Forms.DataGrid
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.TabControl1.SuspendLayout()
        CType(Me.dgresult, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'TabControl1
        '
        Me.TabControl1.Controls.Add(Me.TabPage1)
        Me.TabControl1.Controls.Add(Me.TabPage2)
        Me.TabControl1.Controls.Add(Me.TabPage3)
        Me.TabControl1.Location = New System.Drawing.Point(0, 0)
        Me.TabControl1.Name = "TabControl1"
        Me.TabControl1.SelectedIndex = 0
        Me.TabControl1.Size = New System.Drawing.Size(504, 24)
        Me.TabControl1.TabIndex = 0
        '
        'TabPage1
        '
        Me.TabPage1.Location = New System.Drawing.Point(4, 21)
        Me.TabPage1.Name = "TabPage1"
        Me.TabPage1.Size = New System.Drawing.Size(496, 0)
        Me.TabPage1.TabIndex = 0
        Me.TabPage1.Text = "数据浏览"
        '
        'TabPage2
        '
        Me.TabPage2.Location = New System.Drawing.Point(4, 21)
        Me.TabPage2.Name = "TabPage2"
        Me.TabPage2.Size = New System.Drawing.Size(496, -1)
        Me.TabPage2.TabIndex = 1
        Me.TabPage2.Text = "高级查询"
        '
        'TabPage3
        '
        Me.TabPage3.Location = New System.Drawing.Point(4, 21)
        Me.TabPage3.Name = "TabPage3"
        Me.TabPage3.Size = New System.Drawing.Size(496, -1)
        Me.TabPage3.TabIndex = 2
        Me.TabPage3.Text = "关于..."
        '
        'txtnm
        '
        Me.txtnm.Location = New System.Drawing.Point(152, 48)
        Me.txtnm.Name = "txtnm"
        Me.txtnm.TabIndex = 1
        Me.txtnm.Text = ""
        '
        'txtaddrs
        '
        Me.txtaddrs.Location = New System.Drawing.Point(376, 48)
        Me.txtaddrs.Name = "txtaddrs"
        Me.txtaddrs.TabIndex = 2
        Me.txtaddrs.Text = ""
        '
        'cb2
        '
        Me.cb2.Items.AddRange(New Object() {"add", "or"})
        Me.cb2.Location = New System.Drawing.Point(280, 48)
        Me.cb2.Name = "cb2"
        Me.cb2.Size = New System.Drawing.Size(72, 20)
        Me.cb2.TabIndex = 3
        Me.cb2.Text = "and"
        '
        'rb1
        '
        Me.rb1.Checked = True
        Me.rb1.Location = New System.Drawing.Point(168, 96)
        Me.rb1.Name = "rb1"
        Me.rb1.TabIndex = 4
        Me.rb1.TabStop = True
        Me.rb1.Text = "精确查找"
        '
        'rb2
        '
        Me.rb2.Location = New System.Drawing.Point(264, 96)
        Me.rb2.Name = "rb2"
        Me.rb2.TabIndex = 5
        Me.rb2.Text = "模糊查找"
        '
        'btnsch
        '
        Me.btnsch.Location = New System.Drawing.Point(400, 96)
        Me.btnsch.Name = "btnsch"
        Me.btnsch.TabIndex = 6
        Me.btnsch.Text = "查找"
        '
        'dgresult
        '
        Me.dgresult.DataMember = ""
        Me.dgresult.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.dgresult.Location = New System.Drawing.Point(16, 128)
        Me.dgresult.Name = "dgresult"
        Me.dgresult.ReadOnly = True
        Me.dgresult.Size = New System.Drawing.Size(472, 176)
        Me.dgresult.TabIndex = 7
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(24, 48)
        Me.Label1.Name = "Label1"
        Me.Label1.TabIndex = 8
        Me.Label1.Text = "设置查询条件"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(24, 96)
        Me.Label2.Name = "Label2"
        Me.Label2.TabIndex = 9
        Me.Label2.Text = "查询结果"
        '
        'search
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(496, 309)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.dgresult)
        Me.Controls.Add(Me.btnsch)
        Me.Controls.Add(Me.rb2)
        Me.Controls.Add(Me.rb1)
        Me.Controls.Add(Me.cb2)
        Me.Controls.Add(Me.txtaddrs)
        Me.Controls.Add(Me.txtnm)
        Me.Controls.Add(Me.TabControl1)
        Me.Name = "search"
        Me.Text = "Form2"
        Me.TabControl1.ResumeLayout(False)
        CType(Me.dgresult, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

End Class

⌨️ 快捷键说明

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