📄 frmstudent.frm
字号:
VERSION 5.00
Begin VB.Form Student
BorderStyle = 1 'Fixed Single
Caption = "学生信息管理"
ClientHeight = 2820
ClientLeft = 45
ClientTop = 330
ClientWidth = 7335
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2820
ScaleWidth = 7335
Begin VB.ComboBox cmbDept
Height = 300
Left = 4515
Style = 2 'Dropdown List
TabIndex = 5
Top = 765
Width = 2175
End
Begin VB.ComboBox cmbClass
Height = 300
Left = 4502
Style = 2 'Dropdown List
TabIndex = 4
Top = 405
Width = 2175
End
Begin VB.ComboBox cmbSex
Height = 300
ItemData = "frmStudent.frx":0000
Left = 1228
List = "frmStudent.frx":0002
Style = 2 'Dropdown List
TabIndex = 3
Top = 1485
Width = 2175
End
Begin VB.TextBox txtNum
Height = 270
Left = 1228
MaxLength = 8
TabIndex = 1
Top = 780
Width = 2175
End
Begin VB.TextBox txtCode
Height = 270
Left = 1228
MaxLength = 8
TabIndex = 2
Top = 1140
Width = 2175
End
Begin VB.TextBox txtRoom
Height = 270
Left = 4502
MaxLength = 10
TabIndex = 7
Top = 1500
Width = 2175
End
Begin VB.TextBox txtTime
Height = 270
Left = 4502
TabIndex = 6
Top = 1140
Width = 2175
End
Begin VB.TextBox txtName
Height = 270
Left = 1228
MaxLength = 15
TabIndex = 0
Top = 420
Width = 2175
End
Begin VB.CommandButton cmdSave
Caption = "保存"
Height = 300
Left = 3662
TabIndex = 10
Top = 2070
Width = 735
End
Begin VB.CommandButton cmdExit
Cancel = -1 'True
Caption = "退出"
Height = 300
Left = 4397
TabIndex = 11
Top = 2070
Width = 735
End
Begin VB.CommandButton cmdDelete
Caption = "删除"
Height = 300
Left = 2912
TabIndex = 9
Top = 2070
Width = 735
End
Begin VB.CommandButton cmdAdd
Caption = "添加"
Height = 300
Left = 2177
TabIndex = 8
Top = 2070
Width = 735
End
Begin VB.PictureBox picNavigation
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 350
Left = 2582
ScaleHeight = 345
ScaleWidth = 2415
TabIndex = 16
Top = 2385
Width = 2410
Begin VB.CommandButton cmdMove
Height = 270
Index = 1
Left = 270
Picture = "frmStudent.frx":0004
Style = 1 'Graphical
TabIndex = 13
Top = 0
Width = 300
End
Begin VB.CommandButton cmdMove
Height = 270
Index = 0
Left = -15
Picture = "frmStudent.frx":0048
Style = 1 'Graphical
TabIndex = 12
Top = 0
Width = 300
End
Begin VB.CommandButton cmdMove
Height = 270
Index = 3
Left = 2010
Picture = "frmStudent.frx":0095
Style = 1 'Graphical
TabIndex = 15
Top = -15
Width = 300
End
Begin VB.CommandButton cmdMove
Height = 270
Index = 2
Left = 1725
Picture = "frmStudent.frx":00E1
Style = 1 'Graphical
TabIndex = 14
Top = -15
Width = 300
End
Begin VB.TextBox txtNews
Height = 270
Left = 555
Locked = -1 'True
TabIndex = 17
TabStop = 0 'False
Top = 0
Width = 1185
End
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "系部名称"
Height = 180
Left = 3673
TabIndex = 25
Top = 825
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "班级名称"
Height = 180
Left = 3673
TabIndex = 24
Top = 465
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "考试教室"
Height = 180
Left = 3673
TabIndex = 23
Top = 1545
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "考试时间"
Height = 180
Left = 3673
TabIndex = 22
Top = 1185
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "考号"
Height = 180
Left = 658
TabIndex = 21
Top = 1185
Width = 360
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "性别"
Height = 180
Left = 658
TabIndex = 20
Top = 1545
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "姓名"
Height = 180
Left = 658
TabIndex = 19
Top = 465
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "学号"
Height = 180
Left = 658
TabIndex = 18
Top = 825
Width = 360
End
End
Attribute VB_Name = "Student"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim isAdding As Boolean '定义操作状态标志
Dim objStudent As Recordset '用于保存学生信息数据表记录
Dim objCn As Connection '用于建立数据库联接
Private Sub cmbClass_KeyPress(KeyAscii As Integer)
'如果敲回车键,使下一控件获得焦点
If KeyAscii = vbKeyReturn Then SendKeys "{TAB}"
End Sub
Private Sub cmbDept_KeyPress(KeyAscii As Integer)
'如果敲回车键,使下一控件获得焦点
If KeyAscii = vbKeyReturn Then SendKeys "{TAB}"
End Sub
Private Sub cmbSex_KeyPress(KeyAscii As Integer)
'如果敲回车键,使下一控件获得焦点
If KeyAscii = vbKeyReturn Then SendKeys "{TAB}"
End Sub
Private Sub cmdExit_Click()
Unload Me '关闭学生信息管理窗体
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -