xpie.ctl
来自「多种图表的绘制及其运用」· CTL 代码 · 共 1,957 行 · 第 1/5 页
CTL
1,957 行
VERSION 5.00
Begin VB.UserControl XPie
Alignable = -1 'True
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 1 'Fixed Single
ClientHeight = 5580
ClientLeft = 0
ClientTop = 0
ClientWidth = 8400
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ScaleHeight = 5580
ScaleWidth = 8400
ToolboxBitmap = "XPie.ctx":0000
Begin VB.PictureBox picCommands
BorderStyle = 0 'None
Height = 330
Left = 120
ScaleHeight = 330
ScaleWidth = 1605
TabIndex = 10
Top = 90
Width = 1605
Begin VB.CommandButton cmdCmd
Height = 315
Index = 2
Left = 660
Picture = "XPie.ctx":0312
Style = 1 'Graphical
TabIndex = 15
Top = 0
Width = 315
End
Begin VB.CommandButton cmdCmd
Height = 315
Index = 4
Left = 1290
Picture = "XPie.ctx":069C
Style = 1 'Graphical
TabIndex = 14
Top = 0
Width = 315
End
Begin VB.CommandButton cmdCmd
Height = 315
Index = 1
Left = 330
Picture = "XPie.ctx":0C26
Style = 1 'Graphical
TabIndex = 13
Top = 0
Width = 315
End
Begin VB.CommandButton cmdCmd
Height = 315
Index = 3
Left = 975
Picture = "XPie.ctx":11B0
Style = 1 'Graphical
TabIndex = 12
Top = 0
Width = 315
End
Begin VB.CommandButton cmdCmd
Height = 315
Index = 0
Left = 0
Picture = "XPie.ctx":173A
Style = 1 'Graphical
TabIndex = 11
Top = 0
Width = 315
End
Begin VB.Image imgCmd
Height = 240
Index = 0
Left = 420
Picture = "XPie.ctx":1CC4
Top = 600
Width = 240
End
Begin VB.Image imgCmd
Height = 240
Index = 1
Left = 660
Picture = "XPie.ctx":1E0E
Top = 600
Width = 240
End
Begin VB.Image imgCmd
Height = 240
Index = 2
Left = 930
Picture = "XPie.ctx":1F58
Top = 600
Width = 240
End
Begin VB.Image imgCmd
Height = 240
Index = 3
Left = 1215
Picture = "XPie.ctx":20A2
Top = 600
Width = 240
End
Begin VB.Image imgCmd
Height = 240
Index = 4
Left = 1470
Picture = "XPie.ctx":21EC
Top = 585
Width = 240
End
End
Begin VB.PictureBox picToPrinterLegend
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 555
Left = 570
ScaleHeight = 555
ScaleWidth = 1005
TabIndex = 9
Top = 3090
Visible = 0 'False
Width = 1005
End
Begin VB.PictureBox picToPrinter
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 555
Left = 570
ScaleHeight = 555
ScaleWidth = 1005
TabIndex = 6
Top = 2460
Visible = 0 'False
Width = 1005
End
Begin VB.PictureBox picInfoPie
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00C0FFFF&
ForeColor = &H80000008&
Height = 435
Left = 900
ScaleHeight = 405
ScaleWidth = 375
TabIndex = 5
Top = 1260
Visible = 0 'False
Width = 405
End
Begin VB.PictureBox picSplitter
AutoRedraw = -1 'True
BorderStyle = 0 'None
BeginProperty Font
Name = "Times New Roman"
Size = 6
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 5415
Left = 3300
ScaleHeight = 5415
ScaleWidth = 75
TabIndex = 4
Top = 0
Width = 75
End
Begin VB.PictureBox picLegend
Appearance = 0 'Flat
BackColor = &H00F0F5F5&
BorderStyle = 0 'None
FillColor = &H00FFF0F0&
ForeColor = &H00FF7040&
Height = 5430
Left = 3360
ScaleHeight = 5430
ScaleWidth = 2130
TabIndex = 1
Top = 0
Width = 2130
Begin VB.VScrollBar vsbContainer
Height = 5445
LargeChange = 5
Left = 1875
Max = 100
TabIndex = 3
TabStop = 0 'False
Top = 0
Width = 255
End
Begin VB.PictureBox picContainer
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00F0F5F5&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 5205
Left = 150
ScaleHeight = 5205
ScaleWidth = 1665
TabIndex = 2
Top = 0
Width = 1665
Begin VB.PictureBox picDescription
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 195
Index = 0
Left = 300
ScaleHeight = 195
ScaleWidth = 765
TabIndex = 8
Top = 150
Visible = 0 'False
Width = 765
End
Begin VB.PictureBox picBox
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 195
Index = 0
Left = 60
ScaleHeight = 195
ScaleWidth = 195
TabIndex = 7
Top = 150
Visible = 0 'False
Width = 195
End
End
End
Begin VB.Label lblInfo
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
BorderStyle = 1 'Fixed Single
ForeColor = &H80000008&
Height = 255
Left = 105
TabIndex = 0
Top = 480
UseMnemonic = 0 'False
Visible = 0 'False
Width = 1050
End
Begin VB.Menu mnuMain
Caption = "&Main"
Visible = 0 'False
Begin VB.Menu mnuMainSaveAs
Caption = "Save As"
End
Begin VB.Menu mnuMainPrint
Caption = "Print"
End
Begin VB.Menu mnuMainCopy
Caption = "Copy"
End
Begin VB.Menu mnuSeparator1
Caption = "-"
End
Begin VB.Menu mnuMainSelectionInfo
Caption = "Selection information"
End
Begin VB.Menu mnuMainViewLegend
Caption = "Display Legend"
End
Begin VB.Menu mnuMainCustomItemsSeparator
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "1"
Index = 0
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "2"
Index = 1
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "3"
Index = 2
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "4"
Index = 3
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "5"
Index = 4
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "6"
Index = 5
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "7"
Index = 6
Visible = 0 'False
End
Begin VB.Menu mnuMainCustomItems
Caption = "8"
Index = 7
Visible = 0 'False
End
End
Begin VB.Menu mnuLegend
Caption = "&Legend"
Begin VB.Menu mnuLegendHide
Caption = "Hide"
End
End
End
Attribute VB_Name = "XPie"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Private Declare Function Pie Lib "gdi32" (ByVal hDC As Long, ByVal x1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, ByVal Y3 As Long, ByVal x4 As Long, ByVal y4 As Long) As Long
Private Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
Private Const PI As Double = 3.14159265358979
Public Enum LegendPrintConstants 'the enumerated for legend printing
legPrintNone = 0
legPrintGraph
legPrintText
End Enum
Private uLegendPrintMode As LegendPrintConstants
Public Enum PrinterFitConstants 'the enumerated for printing
prtFitCentered = 0
prtFitStretched
prtFitTopLeft
prtFitTopRight
prtFitBottomLeft
prtFitBottomRight
End Enum
Private uPrinterFit As PrinterFitConstants
Private uPrinterOrientation As PrinterObjectConstants
Private uDataFormat As String 'the data format for numeric values
Private uPicture As StdPicture 'the background picture
Private uPictureTile As Boolean 'marker indicating if the background picture must be tiled
'(TRUE) or stretched (FALSE)
Private uAutoRedraw As Boolean 'indicates if the chart is auto-redrawn upon every property change
Private uPieBorderColor As Long 'the color of the pie border
Private uMarkerColor As Long 'the color of the symbol
Private uLegendBackColor As Long 'the legend background color
Private uLegendForeColor As Long 'the legend foreground color
Private uInfoBackColor As Long 'the information picBox background color
Private uInfoForeColor As Long 'the information picBox foreground color
Private uChartTitleColor As Long 'the chart title color
Private uChartSubTitleColor As Long 'the chart subtitle color
Private uSelected As Integer 'marker indicating the selected column
Private uSelectable As Boolean 'marker indicating whether user can select a column
Private uSelectedColor As Long 'the selected marker forecolor
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?