frmtest.frm

来自「多种图表的绘制及其运用」· FRM 代码 · 共 682 行 · 第 1/2 页

FRM
682
字号
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Object = "*\AXpie.vbp"
Begin VB.Form frmTest 
   Caption         =   "ActivePie Test"
   ClientHeight    =   8265
   ClientLeft      =   165
   ClientTop       =   465
   ClientWidth     =   11445
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   8265
   ScaleWidth      =   11445
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command2 
      Caption         =   "&Apply (Static)"
      Height          =   345
      Left            =   2010
      TabIndex        =   23
      Top             =   7830
      Width           =   1815
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Hot tracking"
      Height          =   195
      Index           =   3
      Left            =   1980
      TabIndex        =   22
      Top             =   7560
      Width           =   1845
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Group segments"
      Height          =   195
      Index           =   0
      Left            =   1980
      TabIndex        =   20
      Top             =   7290
      Width           =   1845
   End
   Begin ActivePie.XPie XPie1 
      Height          =   4665
      Left            =   90
      TabIndex        =   19
      Top             =   90
      Width           =   11265
      _ExtentX        =   19870
      _ExtentY        =   8229
      InfoItems       =   ""
      SelectedColor   =   32768
      uSelectable     =   -1  'True
      uSelected       =   -1
      MarginTop       =   750
      MarginBottom    =   300
      MarginLeft      =   300
      MarginRight     =   300
      uChartTitle     =   "XPie"
      uChartSubTitle  =   "Test of XPie OCX"
      uDisplayDescript=   -1  'True
      BackColor       =   16777152
      ForeColor       =   -2147483640
      LegendBackColor =   12632064
      LegendForeColor =   16777215
      InfoBackColor   =   8454016
      InfoForeColor   =   16384
      InfoPieBackColor=   0
      InfoPieForeColor=   0
      ChartTitleColor =   -2147483640
      ChartSubTitleColor=   -2147483640
      GroupExplodeBackColor=   8454143
      GroupExplodeForeColor=   8388608
      GroupExplodeTitleColor=   128
      GroupExplodeMenuItems=   "&OK|&Print|Others...|Item&1|Item&2"
      MenuType        =   0
      MenuItems       =   "&Save as...|&Print|&Copy|Selection &information|&Legend|&Hide"
      CustomMenuItems =   ""
      InfoItems       =   ""
      SaveAsCaption   =   ""
      AutoRedraw      =   -1  'True
      PictureTile     =   0   'False
      MarkerColor     =   16384
      PieBorderColor  =   4210688
      DataFormat      =   ""
      PrinterFit      =   1
      PrinterOrientation=   2
      LegendCaption   =   "Display legend"
      HotTracking     =   -1  'True
      LegendPrintMode =   1
      GroupSegment    =   0   'False
      GroupExplodeOnClick=   -1  'True
      GroupExplodeAllowCommands=   -1  'True
   End
   Begin VB.ComboBox cboPrtMode 
      Height          =   315
      Left            =   750
      Style           =   2  'Dropdown List
      TabIndex        =   13
      Top             =   7350
      Width           =   1125
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Show back picture"
      Height          =   195
      Index           =   2
      Left            =   1980
      TabIndex        =   14
      Top             =   7020
      Width           =   1815
   End
   Begin VB.CheckBox Check1 
      Caption         =   "Tile back picture"
      Height          =   195
      Index           =   1
      Left            =   1980
      TabIndex        =   11
      Top             =   6750
      Width           =   1815
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Buttons menu"
      Height          =   225
      Index           =   1
      Left            =   1980
      TabIndex        =   10
      Top             =   6450
      Width           =   1815
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Popup menu"
      Height          =   225
      Index           =   0
      Left            =   1980
      TabIndex        =   9
      Top             =   6150
      Width           =   1815
   End
   Begin VB.CommandButton Command1 
      Caption         =   "&Apply (Random)"
      Height          =   345
      Left            =   120
      TabIndex        =   2
      Top             =   7830
      Width           =   1815
   End
   Begin MSComDlg.CommonDialog dlgColor 
      Left            =   7200
      Top             =   -60
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
      DialogTitle     =   "Choose color"
   End
   Begin MSFlexGridLib.MSFlexGrid grd 
      Height          =   3270
      Left            =   3990
      TabIndex        =   0
      Top             =   4890
      Width           =   7425
      _ExtentX        =   13097
      _ExtentY        =   5768
      _Version        =   393216
      Rows            =   0
      Cols            =   3
      FixedRows       =   0
      FixedCols       =   0
      BackColorBkg    =   -2147483633
      AllowBigSelection=   0   'False
      ScrollTrack     =   -1  'True
      FocusRect       =   0
      SelectionMode   =   1
      AllowUserResizing=   1
      BorderStyle     =   0
      Appearance      =   0
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Pie border color"
      Height          =   255
      Index           =   3
      Left            =   60
      TabIndex        =   21
      Top             =   5820
      Width           =   1845
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Printing mode"
      Height          =   390
      Left            =   60
      TabIndex        =   12
      Top             =   7350
      Width           =   660
      WordWrap        =   -1  'True
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Info Pie backcolor"
      Height          =   255
      Index           =   18
      Left            =   60
      TabIndex        =   18
      Top             =   7020
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Info Pie forecolor"
      Height          =   255
      Index           =   17
      Left            =   60
      TabIndex        =   17
      Top             =   6720
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Selected color"
      Height          =   255
      Index           =   15
      Left            =   60
      TabIndex        =   16
      Top             =   6420
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Marker color"
      Height          =   255
      Index           =   16
      Left            =   60
      TabIndex        =   15
      Top             =   6120
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Info background color"
      Height          =   255
      Index           =   12
      Left            =   1950
      TabIndex        =   8
      Top             =   5520
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Info foreground color"
      Height          =   255
      Index           =   11
      Left            =   1950
      TabIndex        =   7
      Top             =   5820
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Legend background color"
      Height          =   255
      Index           =   10
      Left            =   1950
      TabIndex        =   6
      Top             =   5220
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Legend foreground color"
      Height          =   255
      Index           =   9
      Left            =   1950
      TabIndex        =   5
      Top             =   4920
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Subtitle color"
      Height          =   255
      Index           =   2
      Left            =   60
      TabIndex        =   4
      Top             =   5520
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Title color"
      Height          =   255
      Index           =   1
      Left            =   60
      TabIndex        =   3
      Top             =   5220
      Width           =   1845
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Background color"
      Height          =   255
      Index           =   0
      Left            =   60
      TabIndex        =   1
      Top             =   4920
      Width           =   1845
   End
End
Attribute VB_Name = "frmTest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub PrepareData(intMode As Integer)
    
    Dim X As Integer
    Dim intSign As Integer
    Dim varMonths As Variant
    Dim varMonthsExt As Variant
    Dim oChartItem As ActivePie.PieSegment
    
    varMonths = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
    varMonthsExt = Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
    
    grd.Rows = 1
    With XPie1
        .Clear
        .CustomMenuItems = "&Hello|&World|Print legend text"
        If intMode = 0 Then

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?