📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
Caption = "Form4"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form4"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
Height = 855
Left = 720
ScaleHeight = 795
ScaleWidth = 1275
TabIndex = 10
Top = 1920
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 1080
TabIndex = 4
Top = 120
Width = 855
End
Begin VB.TextBox Text2
Height = 495
Left = 2880
TabIndex = 3
Top = 120
Width = 975
End
Begin VB.TextBox Text3
Height = 495
Left = 1080
TabIndex = 2
Top = 960
Width = 855
End
Begin VB.TextBox Text4
Height = 615
Left = 2760
TabIndex = 1
Top = 720
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 495
Left = 2760
TabIndex = 0
Top = 1920
Width = 1455
End
Begin VB.Label Label1
Caption = "学号"
Height = 495
Left = 120
TabIndex = 9
Top = 120
Width = 615
End
Begin VB.Label Label2
Caption = "姓名"
Height = 375
Left = 2040
TabIndex = 8
Top = 120
Width = 495
End
Begin VB.Label Label3
Caption = "课程"
Height = 375
Left = 0
TabIndex = 7
Top = 960
Width = 735
End
Begin VB.Label Label4
Caption = "成绩"
Height = 375
Left = 2040
TabIndex = 6
Top = 840
Width = 615
End
Begin VB.Label Label5
Caption = "照片"
Height = 375
Left = 0
TabIndex = 5
Top = 1920
Width = 495
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub form_click()
Dim cnn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim a As String
cnn.Open "provider=sqloledb;server=(local);uid=sa;pwd=;database=student"
rs.Open "select * from 学生", cnn, adOpenKeyset, adLockOptimistic, adCmdText
Text1 = rs.Fields("学号")
Text2 = rs.Fields("姓名")
Text3 = rs.Fields("课程")
Text4 = rs.Fields("成绩")
Picture1 = rs.Fields("照片")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -