📄 form1.vb
字号:
Public Class Form1
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 LB1 As System.Windows.Forms.Label
Friend WithEvents LB2 As System.Windows.Forms.Label
Friend WithEvents LB3 As System.Windows.Forms.Label
Friend WithEvents LB4 As System.Windows.Forms.Label
Friend WithEvents LB5 As System.Windows.Forms.Label
Friend WithEvents LB6 As System.Windows.Forms.Label
Friend WithEvents BT1 As System.Windows.Forms.Button
Friend WithEvents BT2 As System.Windows.Forms.Button
Friend WithEvents TB1 As System.Windows.Forms.TextBox
Friend WithEvents TB2 As System.Windows.Forms.TextBox
Friend WithEvents TB3 As System.Windows.Forms.TextBox
Friend WithEvents TB4 As System.Windows.Forms.TextBox
Friend WithEvents TB5 As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.LB1 = New System.Windows.Forms.Label
Me.LB2 = New System.Windows.Forms.Label
Me.LB3 = New System.Windows.Forms.Label
Me.LB4 = New System.Windows.Forms.Label
Me.LB5 = New System.Windows.Forms.Label
Me.TB1 = New System.Windows.Forms.TextBox
Me.TB2 = New System.Windows.Forms.TextBox
Me.TB3 = New System.Windows.Forms.TextBox
Me.TB4 = New System.Windows.Forms.TextBox
Me.TB5 = New System.Windows.Forms.TextBox
Me.LB6 = New System.Windows.Forms.Label
Me.BT1 = New System.Windows.Forms.Button
Me.BT2 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'LB1
'
Me.LB1.Location = New System.Drawing.Point(0, 8)
Me.LB1.Name = "LB1"
Me.LB1.Size = New System.Drawing.Size(64, 24)
Me.LB1.TabIndex = 0
Me.LB1.Text = "学号"
'
'LB2
'
Me.LB2.Location = New System.Drawing.Point(8, 48)
Me.LB2.Name = "LB2"
Me.LB2.Size = New System.Drawing.Size(56, 23)
Me.LB2.TabIndex = 1
Me.LB2.Text = "姓名"
'
'LB3
'
Me.LB3.Location = New System.Drawing.Point(8, 80)
Me.LB3.Name = "LB3"
Me.LB3.Size = New System.Drawing.Size(56, 24)
Me.LB3.TabIndex = 2
Me.LB3.Text = "电话"
'
'LB4
'
Me.LB4.Location = New System.Drawing.Point(8, 120)
Me.LB4.Name = "LB4"
Me.LB4.Size = New System.Drawing.Size(48, 24)
Me.LB4.TabIndex = 3
Me.LB4.Text = "数学"
'
'LB5
'
Me.LB5.Location = New System.Drawing.Point(0, 168)
Me.LB5.Name = "LB5"
Me.LB5.Size = New System.Drawing.Size(56, 24)
Me.LB5.TabIndex = 4
Me.LB5.Text = "计算机"
'
'TB1
'
Me.TB1.Location = New System.Drawing.Point(64, 8)
Me.TB1.Name = "TB1"
Me.TB1.Size = New System.Drawing.Size(56, 21)
Me.TB1.TabIndex = 5
Me.TB1.Text = ""
'
'TB2
'
Me.TB2.Location = New System.Drawing.Point(64, 40)
Me.TB2.Name = "TB2"
Me.TB2.Size = New System.Drawing.Size(56, 21)
Me.TB2.TabIndex = 6
Me.TB2.Text = ""
'
'TB3
'
Me.TB3.Location = New System.Drawing.Point(64, 80)
Me.TB3.Name = "TB3"
Me.TB3.Size = New System.Drawing.Size(56, 21)
Me.TB3.TabIndex = 7
Me.TB3.Text = ""
'
'TB4
'
Me.TB4.Location = New System.Drawing.Point(64, 120)
Me.TB4.Name = "TB4"
Me.TB4.Size = New System.Drawing.Size(56, 21)
Me.TB4.TabIndex = 8
Me.TB4.Text = ""
'
'TB5
'
Me.TB5.Location = New System.Drawing.Point(64, 160)
Me.TB5.Name = "TB5"
Me.TB5.Size = New System.Drawing.Size(56, 21)
Me.TB5.TabIndex = 9
Me.TB5.Text = ""
'
'LB6
'
Me.LB6.Location = New System.Drawing.Point(136, 16)
Me.LB6.Name = "LB6"
Me.LB6.Size = New System.Drawing.Size(152, 168)
Me.LB6.TabIndex = 10
'
'BT1
'
Me.BT1.Location = New System.Drawing.Point(32, 216)
Me.BT1.Name = "BT1"
Me.BT1.TabIndex = 11
Me.BT1.Text = "确定"
'
'BT2
'
Me.BT2.Location = New System.Drawing.Point(160, 216)
Me.BT2.Name = "BT2"
Me.BT2.TabIndex = 12
Me.BT2.Text = "取消"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.BT2)
Me.Controls.Add(Me.BT1)
Me.Controls.Add(Me.LB6)
Me.Controls.Add(Me.TB5)
Me.Controls.Add(Me.TB4)
Me.Controls.Add(Me.TB3)
Me.Controls.Add(Me.TB2)
Me.Controls.Add(Me.TB1)
Me.Controls.Add(Me.LB5)
Me.Controls.Add(Me.LB4)
Me.Controls.Add(Me.LB3)
Me.Controls.Add(Me.LB2)
Me.Controls.Add(Me.LB1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Public Sub BT1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT1.Click
Dim stud As New student
TB1.Text = stud.number
TB2.Text = stud.name
TB3.Text = stud.phone
TB4.Text = stud.math
TB5.Text = stud.computerscore
LB6.Text = stud.studentinfo
stud = Nothing
End Sub
Private Sub BT2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BT2.Click
LB6.Text = ""
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -