📄 main.frm
字号:
End
End
Begin VB.CommandButton cmdDataSever
Caption = "数据查询"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 6000
TabIndex = 2
Top = 120
Width = 2175
End
Begin VB.CommandButton cmdcourse
Caption = "浏览全部课程记录"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 10320
TabIndex = 1
Top = 120
Width = 2535
End
Begin VB.CommandButton cmdstu
Cancel = -1 'True
Caption = "浏览全部学生记录"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1800
TabIndex = 0
Top = 120
Width = 2295
End
Begin VB.Label Label9
BackStyle = 0 'Transparent
Caption = "平均成绩"
Height = 495
Left = 5160
TabIndex = 19
Top = 8160
Visible = 0 'False
Width = 1575
End
Begin VB.Label Label8
BackStyle = 0 'Transparent
Caption = "课程名"
Height = 495
Left = 5160
TabIndex = 18
Top = 4800
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label7
BackStyle = 0 'Transparent
Caption = "课程编号"
Height = 495
Left = 5160
TabIndex = 17
Top = 5520
Visible = 0 'False
Width = 1575
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "教师"
Height = 495
Left = 5160
TabIndex = 16
Top = 6360
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "选课人数"
Height = 495
Left = 5160
TabIndex = 15
Top = 7200
Visible = 0 'False
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "专业"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 14
Top = 7320
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "班级"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 13
Top = 6480
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "学号"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 12
Top = 5640
Visible = 0 'False
Width = 1215
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学生姓名"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5280
TabIndex = 11
Top = 4920
Visible = 0 'False
Width = 1215
End
End
Attribute VB_Name = "main"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bcaption As Boolean
Private Sub cmdstu_Click()
student.Show '1
'mian.Hide
End Sub
Private Sub cmdcourse_Click()
course.Show '1
main.Hide
End Sub
Private Sub cmdDataSever_Click()
bcaption = Not bcaption
If bcaption = True Then
chooseData.Visible = True
'tabOfmsg.Visible = True
'Adodc.Visible = True
'Adodc.Caption = "数据表格显示"
'Command3.Caption = "显示主界面"
Else
'chooseData.Visible = False
tabOfmsg.Visible = False
'Adodc.Visible = False
'Command3.Caption = "显示数据"
End If
End Sub
'Private Sub Form_Load()
'Adodc.DatabaseName = App.Path & "\" & "xuanke.mdb"
'End Sub
Private Sub Option1_Click()
Data1.RecordSource = "student"
Data1.Caption = "学生记录显示"
Data1.Refresh
End Sub
Private Sub Option2_Click()
Data1.RecordSource = "subject"
Data1.Caption = "课程记录显示"
Data1.Refresh
End Sub
Private Sub couseMsg_Click()
'cou.Visible = True
'stu.Visible = False
cou.Recordset.MoveFirst
Dim readIn, checkIn
readIn = "请输入您所要查询的课程号"
checkIn = InputBox$(readIn)
cou.Recordset.Find "course_id='" & checkIn & "'"
Label1.Visible = True
label2.Visible = True
label3.Visible = True
label4.Visible = True
stuName.Visible = True
stuID.Visible = True
class.Visible = True
major.Visible = True
label5.Visible = True
Label6.Visible = True
Label7.Visible = True
Label9.Visible = True
Label8.Visible = True
couName.Visible = True
couID.Visible = True
numOfstu.Visible = True
score.Visible = True
couOffer.Visible = True
'If cou.Recordset.NoMatch Then
'MsgBox "无此学号!", , "提示"
End Sub
Private Sub return_Click()
login.Show
Unload Me
End Sub
Private Sub studentMsg_Click()
'stu.Visible = True
'cou.Visible = False
stu.Recordset.MoveFirst
Dim readIn, checkIn
readIn = "请输入您的学号"
checkIn = InputBox$(readIn)
stu.Recordset.Find "student_id='" & checkIn & "'"
Label1.Visible = True
label2.Visible = True
label3.Visible = True
label4.Visible = True
stuName.Visible = True
stuID.Visible = True
class.Visible = True
major.Visible = True
label5.Visible = False
Label6.Visible = False
Label7.Visible = False
Label9.Visible = False
Label8.Visible = False
couName.Visible = False
couID.Visible = False
numOfstu.Visible = False
score.Visible = False
couOffer.Visible = False
'If stu.Recordset.NoMatch Then
'MsgBox "无此学号!", , "提示"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -