?? form7.frm
字號:
VERSION 5.00
Object = "{CFA7AFF4-3242-4269-9172-7389D695AE01}#1.0#0"; "StoneXP.ocx"
Begin VB.Form Form7
BackColor = &H00C0FFC0&
BorderStyle = 1 'Fixed Single
Caption = "圖表生成窗口"
ClientHeight = 2835
ClientLeft = 45
ClientTop = 435
ClientWidth = 5415
Icon = "Form7.frx":0000
LinkTopic = "Form7"
MaxButton = 0 'False
ScaleHeight = 2835
ScaleWidth = 5415
StartUpPosition = 1 '所有者中心
Begin StoneXP.XPFrame XPFrame1
Height = 1815
Left = 480
TabIndex = 6
Top = 600
Visible = 0 'False
Width = 4335
_ExtentX = 7646
_ExtentY = 3201
Caption = "選擇"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = 255
LeftSpace = 0
TopSpace = 5
RightSpace = 0
BottomSpace = 0
CaptionTop = 0
RoundSize = 1
Begin StoneXP.XPButton XPButton1
Height = 375
Left = 1560
TabIndex = 9
Top = 1200
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "確 定"
MouseIcon = "Form7.frx":F84A
MousePointer = 99
End
Begin StoneXP.XPRadioButton XPRadioButton1
Height = 375
Left = 840
TabIndex = 7
Top = 480
Width = 1095
_ExtentX = 1931
_ExtentY = 661
Value = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "圖表統計"
BackColor = 16777215
End
Begin StoneXP.XPRadioButton XPRadioButton2
Height = 375
Left = 2400
TabIndex = 8
Top = 480
Width = 1095
_ExtentX = 1931
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "表格統計"
BackColor = 16777215
End
End
Begin VB.CommandButton Command2
Caption = "退出窗口"
Height = 375
Left = 3120
TabIndex = 5
Top = 1920
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "生成圖表"
Height = 375
Left = 840
TabIndex = 4
Top = 1920
Width = 1575
End
Begin VB.ComboBox Combo2
Height = 300
Left = 2400
TabIndex = 3
Top = 1200
Width = 2295
End
Begin VB.ComboBox Combo1
Height = 300
Left = 2400
TabIndex = 2
Top = 720
Width = 2295
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "請輸入課程名稱:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 1
Top = 1200
Width = 1935
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "請輸入班級名稱:"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 0
Top = 720
Width = 1935
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
XPFrame1.Visible = True
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
XPFrame1.Visible = False
Set qy2 = cnn.Execute("select 班級名稱 from 班級")
Do While Not qy2.EOF
Combo1.AddItem qy2.Fields(0)
qy2.MoveNext
Loop
Set qy2 = cnn.Execute("select 課程名稱 from 課程")
Do While Not qy2.EOF
Combo2.AddItem qy2.Fields(0)
qy2.MoveNext
Loop
End Sub
Private Sub XPButton1_Click()
If XPRadioButton1.Value = True Then
XPFrame1.Visible = False
If Combo1.Text <> "" And Combo2.Text <> "" Then
tbsql1 = "select 姓名,avg(成績) as 平均成績,max(成績) as 最高分,min(成績) as 最低分 from 學生與課程,學生信息 where 學生與課程.學號=學生與課程.學號 and 學生信息.學號=學生與課程.學號 and 班級='" & Combo1.Text & "' and 課程名稱='" & Combo2.Text & "' Group by 姓名 order by avg(成績) desc"
tbbm1 = Combo1.Text & Combo2.Text & " 成績統計表"
tbsql2 = "select 成績 from 學生與課程,學生信息 where 學生與課程.學號=學生信息.學號 and 班級='" & Combo1.Text & "' and 課程名稱='" & Combo2.Text & "'"
ElseIf Combo1.Text <> "" Then
tbsql1 = "select 姓名,avg(成績) as 平均成績,max(成績) as 最高分,min(成績) as 最低分 from 學生與課程,學生信息 where 學生與課程.學號=學生與課程.學號 and 學生信息.學號=學生與課程.學號 and 班級='" & Combo1.Text & "' Group by 姓名 order by avg(成績) desc"
tbbm1 = Combo1.Text & "所有成績統計表"
tbsql2 = "select 成績 from 學生與課程,學生信息 where 學生與課程.學號=學生信息.學號 and 班級='" & Combo1.Text & "'"
Else
tbsql1 = "select 姓名,avg(成績) as 平均成績,max(成績) as 最高分,min(成績) as 最低分 from 學生與課程,學生信息 where 學生與課程.學號=學生與課程.學號 and 學生信息.學號=學生與課程.學號 Group by 姓名 order by avg(成績) desc"
tbbm1 = "所有學生成績統計表"
tbsql2 = "select 成績 from 學生與課程,學生信息 where 學生與課程.學號=學生信息.學號"
End If
Unload Me
Form5.Show 1
Else
If Combo1.Text <> "" Then
Class = Combo1.Text
tbbm1 = Combo1.Text & " 成績統計表"
Else
MsgBox "未選擇班級!"
XPFrame1.Visible = False
Exit Sub
End If
Unload Me
Form8.Show 1
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -