📄 frmchart.frm
字号:
VERSION 5.00
Object = "{65E121D4-0C60-11D2-A9FC-0000F8754DA1}#2.0#0"; "mschrt20.ocx"
Begin VB.Form frmChart
BorderStyle = 3 'Fixed Dialog
Caption = "图表"
ClientHeight = 4545
ClientLeft = 45
ClientTop = 330
ClientWidth = 7305
Icon = "frmChart.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 7305
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmChart.frx":030A
Left = 960
List = "frmChart.frx":0318
Style = 2 'Dropdown List
TabIndex = 3
Top = 4080
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "关闭"
Height = 375
Left = 5640
TabIndex = 1
Top = 4080
Width = 1335
End
Begin MSChart20Lib.MSChart Chart
Height = 3975
Left = 120
OleObjectBlob = "frmChart.frx":0340
TabIndex = 0
Top = 0
Width = 7095
End
Begin VB.Label Label1
Caption = "图表类型"
Height = 255
Left = 120
TabIndex = 2
Top = 4200
Width = 855
End
End
Attribute VB_Name = "frmChart"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_click()
Select Case Combo1.ListIndex
Case 0
Chart.chartType = 1
Case 1
Chart.chartType = 14
Case 2
Chart.chartType = 0
End Select
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer, j As Integer
Chart.RowCount = 5
Chart.ColumnCount = 4
For i = 1 To 5
Chart.Row = i
For j = 1 To 4
Chart.Column = j
Chart.Data = 0
Next
Next
Chart.Row = 1
Chart.RowLabel = "不及格"
Chart.Row = 2
Chart.RowLabel = "及格"
Chart.Row = 3
Chart.RowLabel = "中"
Chart.Row = 4
Chart.RowLabel = "良"
Chart.Row = 5
Chart.RowLabel = "优"
For i = 5 To 8
Chart.Column = i - 4
Select Case i
Case 5
Chart.ColumnLabel = "高等数据"
Case 6
Chart.ColumnLabel = "大学英语"
Case 7
Chart.ColumnLabel = "普通物理"
Case 8
Chart.ColumnLabel = "电子技术"
End Select
For j = 1 To frmMain.Grid.Rows - 1
Select Case Val(frmMain.Grid.TextMatrix(j, i))
Case Is < 60
Chart.Row = 1
Case 60 To 69
Chart.Row = 2
Case 70 To 79
Chart.Row = 3
Case 80 To 89
Chart.Row = 4
Case Is > 90
Chart.Row = 5
End Select
Chart.Data = Chart.Data + 1
Next
Next
Chart.chartType = 1
Chart.ShowLegend = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -