📄 form9.frm
字号:
VERSION 5.00
Begin VB.Form Form9
BackColor = &H80000009&
Caption = "浏览学生选课"
ClientHeight = 4785
ClientLeft = 60
ClientTop = 345
ClientWidth = 7305
LinkTopic = "Form9"
Picture = "Form9.frx":0000
ScaleHeight = 4785
ScaleWidth = 7305
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command5
BackColor = &H8000000E&
Height = 495
Left = 3480
Picture = "Form9.frx":B7AD
Style = 1 'Graphical
TabIndex = 7
Top = 3720
Width = 975
End
Begin VB.CommandButton Command4
BackColor = &H8000000E&
Caption = ">|"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 6
Top = 3720
Width = 495
End
Begin VB.CommandButton Command3
BackColor = &H8000000E&
Caption = ">"
Height = 495
Left = 1920
Style = 1 'Graphical
TabIndex = 5
Top = 3720
Width = 495
End
Begin VB.CommandButton Command2
BackColor = &H8000000E&
Caption = "<"
Height = 495
Left = 1440
Style = 1 'Graphical
TabIndex = 4
Top = 3720
Width = 495
End
Begin VB.CommandButton Command1
BackColor = &H8000000E&
Caption = "|<"
Height = 495
Left = 960
Style = 1 'Graphical
TabIndex = 3
Top = 3720
Width = 495
End
Begin VB.TextBox Text3
Height = 375
Left = 2160
TabIndex = 2
Top = 2880
Width = 1815
End
Begin VB.TextBox Text2
Height = 375
Left = 2160
TabIndex = 1
Top = 2280
Width = 1815
End
Begin VB.TextBox Text1
Height = 375
Left = 2160
TabIndex = 0
Top = 1560
Width = 1815
End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
Set Text1.DataSource = myrs: Text1.DataField = "学号"
Set Text2.DataSource = myrs: Text2.DataField = "课程号"
Set Text3.DataSource = myrs: Text3.DataField = "成绩"
End Sub
Private Sub Command1_Click()
myrs.MoveFirst
Command2.Enabled = True
Command3.Enabled = True
End Sub
Private Sub Command2_Click()
If Not myrs.BOF Then
myrs.MovePrevious
End If
If Text1.Text = "" Then
MsgBox "没有学生选课信息,不能再向前移动!", vbExclamation, "注意"
Command2.Enabled = False
End If
Command3.Enabled = True
End Sub
Private Sub Command3_Click()
If Not myrs.EOF Then
myrs.MoveNext
End If
If Text1.Text = "" Then
MsgBox "没有学生选课信息,不能再向后移动!", vbExclamation, "注意"
Command3.Enabled = False
End If
Command2.Enabled = True
End Sub
Private Sub Command4_Click()
myrs.MoveLast
Command2.Enabled = True
Command3.Enabled = True
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set Text1.DataSource = Nothing
Set Text2.DataSource = Nothing
Set Text3.DataSource = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -