📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "漏电流曲线示意图 Ver1.0"
ClientHeight = 6120
ClientLeft = 60
ClientTop = 450
ClientWidth = 9780
Icon = "Form1.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6120
ScaleWidth = 9780
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Print"
Height = 495
Left = 2640
TabIndex = 2
Top = 5400
Width = 1095
End
Begin VB.PictureBox Picture1
Height = 495
Left = 720
ScaleHeight = 435
ScaleWidth = 1395
TabIndex = 1
Top = 5400
Width = 1455
End
Begin Project1.Chart Chart1
Height = 5175
Left = 15
TabIndex = 0
Top = 15
Width = 9105
_extentx = 17119
_extenty = 9551
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
' :) 人人为我,我为人人 :)
'枕善居汉化收藏整理
'发布日期:05/07/08
'描 述:曲线图示例
'网 站:http://www.mndsoft.com/
'e-mail :mnd@mndsoft.com
'OICQ :88382850
'****************************************************************************
Option Explicit
Public Sub RefreshGraph()
Dim myArray(2) As String
Dim MyColor(2) As Long
Dim MyCaption(10) As String
Dim MyLegend(2) As String
Dim i As Integer
For i = 1 To 10
MyCaption(i) = "测试 " & i
Next i
myArray(0) = "10,14,23,19,18,25,15,17,13,15"
MyColor(0) = vbRed
myArray(1) = "8,9,6,11,15,29,18,20,23,27"
MyColor(1) = vbBlue
myArray(2) = "12,8,7,13,14,22,12,10,25,23"
MyColor(2) = vbGreen
Chart1.MaxValue = 29
Chart1.MinValue = 0
Chart1.Rows = 10
Chart1.Cols = 3
Chart1.DrawGraph myArray, MyColor, MyCaption
MyLegend(0) = "总漏电流图例"
MyLegend(1) = "当月漏电流图例"
MyLegend(2) = "当日漏电流图例"
Chart1.DrawLegend MyLegend, MyColor
End Sub
'Private Sub Command1_Click()
'Chart1..EditCopy
'Picture1.Picture = Clipboard.GetData()
'Printer.Print " "
'Printer.PaintPicture Form1.Picture1.Picture, 0, 0
'Printer.EndDoc
'End Sub
Private Sub Form_Load()
RefreshGraph
End Sub
Private Sub Form_Resize()
Chart1.Width = Me.ScaleWidth - 30
Chart1.Height = Me.ScaleHeight - 30
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -