📄 colors.frm
字号:
VERSION 5.00
Object = "{8996B0A4-D7BE-101B-8650-00AA003A5593}#4.0#0"; "Cfx4032.ocx"
Begin VB.Form Form1
Caption = "Chart FX. Colors and Fonts"
ClientHeight = 4590
ClientLeft = 1515
ClientTop = 1965
ClientWidth = 8505
LinkTopic = "Form1"
ScaleHeight = 4590
ScaleWidth = 8505
Begin VB.CommandButton Command5
Caption = "Multiple colors"
Height = 375
Left = 6840
TabIndex = 5
Top = 2520
Width = 1455
End
Begin VB.CommandButton Command4
Caption = "Point labels"
Height = 375
Left = 6840
TabIndex = 4
Top = 1920
Width = 1455
End
Begin VB.CommandButton Command3
Caption = "Bakground color"
Height = 375
Left = 6840
TabIndex = 3
Top = 1320
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "Text color"
Height = 375
Left = 6840
TabIndex = 2
Top = 720
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "Series color"
Height = 375
Left = 6840
TabIndex = 1
Top = 120
Width = 1455
End
Begin ChartFXLibCtl.ChartFX ChartFX1
Height = 4335
Left = 240
TabIndex = 0
Top = 120
Width = 6495
_cx = 2011042776
_cy = 2011042776
_Version = 262144
LeftGap = 61
TopGap = 38
BottomGap = 42
MarkerShape = 0
Volume = 100
BorderWidth = 2
BorderColor = 3
Axis(0).Max = 200
nColors = 2
nPts = 10
NumPoint = 10
MMask = 1026
Title(2) = "Chart Title"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
ChartFX1.OpenDataEx COD_COLORS, 2, 0
ChartFX1.Series(0).Color = RGB(255, 0, 0)
ChartFX1.Series(1).Color = RGB(0, 255, 0)
ChartFX1.CloseData COD_COLORS
End Sub
Private Sub Command2_Click()
With ChartFX1.Axis(AXIS_Y)
.TextColor = RGB(100, 100, 0)
With .Font
.Bold = False
.Italic = True
.Name = "Bookman Old Style"
.Size = 10
End With
.TitleColor = RGB(100, 100, 0)
With .TitleFont
.Bold = False
.Italic = True
.Name = "Times New Roman"
.Size = 14
End With
End With
With ChartFX1.Axis(AXIS_X)
.TextColor = RGB(100, 100, 0)
With .Font
.Bold = False
.Italic = True
.Name = "Bookman Old Style"
.Size = 10
End With
.TitleColor = RGB(100, 100, 0)
With .TitleFont
.Bold = False
.Italic = True
.Name = "Times New Roman"
.Size = 14
End With
End With
ChartFX1.RGBFont(CHART_TOPTIT) = RGB(100, 100, 0)
ChartFX1.Fonts(CHART_TOPTIT) = CF_TIMESNEWR Or CF_ITALIC Or CF_BOLD Or 18
End Sub
Private Sub Command3_Click()
ChartFX1.RGBBk = RGB(200, 200, 200)
ChartFX1.RGB3DBk = RGB(100, 200, 175)
End Sub
Private Sub Command4_Click()
With ChartFX1.Series(0)
.PointLabels = True
.PointLabelAlign = LA_RIGHT Or LA_BASELINE
.PointLabelAngle = -45
End With
ChartFX1.RGBFont(CHART_VALUESFT) = RGB(255, 255, 255)
ChartFX1.Fonts(CHART_VALUESFT) = CF_COURIERNEW Or CF_BOLD Or CF_ITALIC Or 10
End Sub
Private Sub Command5_Click()
Dim i, j As Integer
ChartFX1.MultipleColors = True
ChartFX1.OpenDataEx COD_COLORS, 20, 0
For j = 0 To 9
ChartFX1.Color(j * 2) = RGB(255, 0, 0)
ChartFX1.Color(1 + j * 2) = RGB(0, 255 - j * 20, 255)
Next j
ChartFX1.CloseData COD_COLORS
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -