📄 form5.frm
字号:
VERSION 5.00
Begin VB.Form Form5
BackColor = &H80000009&
Caption = "查询结果"
ClientHeight = 5235
ClientLeft = 60
ClientTop = 345
ClientWidth = 7365
LinkTopic = "Form5"
Picture = "Form5.frx":0000
ScaleHeight = 5235
ScaleWidth = 7365
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text6
Height = 375
Left = 3960
TabIndex = 10
Top = 2160
Width = 855
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 9
Top = 1560
Width = 975
End
Begin VB.TextBox Text2
Height = 375
Left = 2160
TabIndex = 8
Top = 2160
Width = 855
End
Begin VB.TextBox Text3
Height = 375
Left = 3960
TabIndex = 7
Top = 1560
Width = 855
End
Begin VB.TextBox Text4
Height = 375
Left = 2160
TabIndex = 6
Top = 2880
Width = 855
End
Begin VB.CommandButton Command1
BackColor = &H8000000E&
Caption = "|<"
Height = 495
Left = 1080
Style = 1 'Graphical
TabIndex = 5
Top = 3720
Width = 495
End
Begin VB.CommandButton Command2
BackColor = &H8000000E&
Caption = "<"
Height = 495
Left = 1560
Style = 1 'Graphical
TabIndex = 4
Top = 3720
Width = 495
End
Begin VB.CommandButton Command3
BackColor = &H8000000E&
Caption = ">"
Height = 495
Left = 2040
Style = 1 'Graphical
TabIndex = 3
Top = 3720
Width = 495
End
Begin VB.CommandButton Command4
BackColor = &H8000000E&
Caption = ">|"
Height = 495
Left = 2520
Style = 1 'Graphical
TabIndex = 2
Top = 3720
Width = 495
End
Begin VB.CommandButton Command5
BackColor = &H8000000E&
Height = 495
Left = 3840
Picture = "Form5.frx":C4DC
Style = 1 'Graphical
TabIndex = 1
Top = 3720
Width = 975
End
Begin VB.TextBox Text5
Height = 375
Left = 4200
TabIndex = 0
Top = 2880
Width = 855
End
End
Attribute VB_Name = "Form5"
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 = "学分"
Set Text4.DataSource = myrs: Text4.DataField = "理论学时"
Set Text5.DataSource = myrs: Text5.DataField = "实践学时"
Set Text6.DataSource = myrs: Text6.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
Set Text4.DataSource = Nothing
Set Text5.DataSource = Nothing
myrs.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -