📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "浏览学生基本信息表"
ClientHeight = 5415
ClientLeft = 60
ClientTop = 345
ClientWidth = 7185
LinkTopic = "Form4"
Picture = "Form4.frx":0000
ScaleHeight = 5415
ScaleWidth = 7185
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text5
Height = 375
Left = 1920
TabIndex = 9
Top = 3120
Width = 2175
End
Begin VB.CommandButton Command5
BackColor = &H8000000E&
Height = 495
Left = 3480
Picture = "Form4.frx":1841E
Style = 1 'Graphical
TabIndex = 8
Top = 3720
Width = 975
End
Begin VB.CommandButton Command4
BackColor = &H8000000E&
Caption = ">|"
Height = 495
Left = 2400
Style = 1 'Graphical
TabIndex = 7
Top = 3720
Width = 495
End
Begin VB.CommandButton Command3
BackColor = &H8000000E&
Caption = ">"
Height = 495
Left = 1920
Style = 1 'Graphical
TabIndex = 6
Top = 3720
Width = 495
End
Begin VB.CommandButton Command2
BackColor = &H8000000E&
Caption = "<"
Height = 495
Left = 1440
Style = 1 'Graphical
TabIndex = 5
Top = 3720
Width = 495
End
Begin VB.CommandButton Command1
BackColor = &H8000000E&
Caption = "|<"
Height = 495
Left = 960
Style = 1 'Graphical
TabIndex = 4
Top = 3720
Width = 495
End
Begin VB.TextBox Text4
Height = 375
Left = 3480
TabIndex = 3
Top = 1440
Width = 735
End
Begin VB.TextBox Text3
Height = 375
Left = 3480
TabIndex = 2
Top = 2160
Width = 735
End
Begin VB.TextBox Text2
Height = 375
Left = 1680
TabIndex = 1
Top = 2160
Width = 975
End
Begin VB.TextBox Text1
Height = 390
Left = 1680
TabIndex = 0
Top = 1425
Width = 975
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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
If Text1.Text = "" Then
MsgBox "没有学生信息,不能再向前移动!", vbExclamation, "注意"
Command2.Enabled = False
End If
Command3.Enabled = True
End If
End Sub
Private Sub Command3_Click()
If Not myrs.EOF Then
myrs.MoveNext
If Text1.Text = "" Then
MsgBox "没有学生信息,不能再向后移动!", vbExclamation, "注意"
Command3.Enabled = False
End If
Command2.Enabled = True
End If
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_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 = "所在系"
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 + -