📄 form4.vb
字号:
Public Class Form4
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 Label1 As System.Windows.Forms.Label
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 GroupBox1 As System.Windows.Forms.GroupBox
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Button2 As System.Windows.Forms.Button
Friend WithEvents txtxm As System.Windows.Forms.TextBox
Friend WithEvents txtxb As System.Windows.Forms.ComboBox
Friend WithEvents txtbj As System.Windows.Forms.ComboBox
Friend WithEvents txtbh As System.Windows.Forms.TextBox
Friend WithEvents Label7 As System.Windows.Forms.Label
Friend WithEvents txtsrrq1 As System.Windows.Forms.TextBox
Friend WithEvents txtsrrq2 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.txtbh = New System.Windows.Forms.TextBox
Me.Label3 = New System.Windows.Forms.Label
Me.txtxm = New System.Windows.Forms.TextBox
Me.Label4 = New System.Windows.Forms.Label
Me.txtxb = New System.Windows.Forms.ComboBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.txtbj = New System.Windows.Forms.ComboBox
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.Button1 = New System.Windows.Forms.Button
Me.Button2 = New System.Windows.Forms.Button
Me.Label7 = New System.Windows.Forms.Label
Me.txtsrrq1 = New System.Windows.Forms.TextBox
Me.txtsrrq2 = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("楷体_GB2312", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(-136, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(656, 24)
Me.Label1.TabIndex = 2
Me.Label1.Text = "学生信息检索"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(24, 48)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(66, 17)
Me.Label2.TabIndex = 3
Me.Label2.Text = "编 号:"
'
'txtbh
'
Me.txtbh.Location = New System.Drawing.Point(88, 48)
Me.txtbh.Name = "txtbh"
Me.txtbh.Size = New System.Drawing.Size(112, 21)
Me.txtbh.TabIndex = 4
Me.txtbh.Text = ""
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(216, 48)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(66, 17)
Me.Label3.TabIndex = 5
Me.Label3.Text = "姓 名:"
'
'txtxm
'
Me.txtxm.Location = New System.Drawing.Point(280, 48)
Me.txtxm.Name = "txtxm"
Me.txtxm.Size = New System.Drawing.Size(120, 21)
Me.txtxm.TabIndex = 6
Me.txtxm.Text = ""
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(24, 80)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(66, 17)
Me.Label4.TabIndex = 7
Me.Label4.Text = "姓 别:"
'
'txtxb
'
Me.txtxb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.txtxb.Items.AddRange(New Object() {"男", "女"})
Me.txtxb.Location = New System.Drawing.Point(88, 80)
Me.txtxb.Name = "txtxb"
Me.txtxb.Size = New System.Drawing.Size(112, 20)
Me.txtxb.TabIndex = 8
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(24, 112)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(66, 17)
Me.Label5.TabIndex = 9
Me.Label5.Text = "出生日期:"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(216, 80)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(66, 17)
Me.Label6.TabIndex = 11
Me.Label6.Text = "所在班级:"
'
'txtbj
'
Me.txtbj.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.txtbj.Items.AddRange(New Object() {"一年级", "二年级", "三年级"})
Me.txtbj.Location = New System.Drawing.Point(280, 80)
Me.txtbj.Name = "txtbj"
Me.txtbj.Size = New System.Drawing.Size(120, 20)
Me.txtbj.TabIndex = 12
'
'GroupBox1
'
Me.GroupBox1.Location = New System.Drawing.Point(-8, 144)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(432, 8)
Me.GroupBox1.TabIndex = 13
Me.GroupBox1.TabStop = False
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(224, 160)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 14
Me.Button1.Text = "检索"
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(312, 160)
Me.Button2.Name = "Button2"
Me.Button2.TabIndex = 15
Me.Button2.Text = "取消"
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Location = New System.Drawing.Point(224, 120)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(35, 17)
Me.Label7.TabIndex = 16
Me.Label7.Text = "-----"
'
'txtsrrq1
'
Me.txtsrrq1.Location = New System.Drawing.Point(88, 112)
Me.txtsrrq1.Name = "txtsrrq1"
Me.txtsrrq1.Size = New System.Drawing.Size(112, 21)
Me.txtsrrq1.TabIndex = 18
Me.txtsrrq1.Text = ""
'
'txtsrrq2
'
Me.txtsrrq2.Location = New System.Drawing.Point(280, 112)
Me.txtsrrq2.Name = "txtsrrq2"
Me.txtsrrq2.Size = New System.Drawing.Size(120, 21)
Me.txtsrrq2.TabIndex = 19
Me.txtsrrq2.Text = ""
'
'Form4
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(416, 189)
Me.Controls.Add(Me.txtsrrq2)
Me.Controls.Add(Me.txtsrrq1)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.txtbj)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.txtxb)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.txtxm)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.txtbh)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow
Me.Name = "Form4"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "学生信息检索"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cls As New clsXs
Dim bh As String
Dim xm As String
Dim xb As String
Dim ssrq1 As String
Dim ssrq2 As String
Dim bj As String
bh = Me.txtbh.Text
xm = Me.txtxm.Text
xb = Me.txtxb.Text
ssrq1 = Me.txtsrrq1.Text
ssrq2 = Me.txtsrrq2.Text
bj = Me.txtbj.Text
If ssrq1 <> "" Then
If IsDate(ssrq1) = False Then
MsgBox("检索日期不正确!", MsgBoxStyle.Information)
Exit Sub
End If
End If
If ssrq2 <> "" Then
If IsDate(ssrq2) = False Then
MsgBox("检索日期不正确!", MsgBoxStyle.Information)
Exit Sub
End If
End If
gForm1.DataGrid1.SetDataBinding(cls.GetList(bh, xm, xb, bj, ssrq1, ssrq2), "")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -