xquadrant.ctl

来自「多种图表的绘制及其运用」· CTL 代码 · 共 1,927 行 · 第 1/5 页

CTL
1,927
字号
VERSION 5.00
Begin VB.UserControl XQuadrant 
   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
   LockControls    =   -1  'True
   ScaleHeight     =   5580
   ScaleWidth      =   8400
   ToolboxBitmap   =   "XQuadrant.ctx":0000
   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        =   16
      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        =   13
      Top             =   2460
      Visible         =   0   'False
      Width           =   1005
   End
   Begin VB.PictureBox picInfoQuadrant 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H00C0FFFF&
      ForeColor       =   &H80000008&
      Height          =   435
      Left            =   900
      ScaleHeight     =   405
      ScaleWidth      =   375
      TabIndex        =   12
      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
      MousePointer    =   9  'Size W E
      ScaleHeight     =   5415
      ScaleWidth      =   75
      TabIndex        =   11
      Top             =   0
      Width           =   75
   End
   Begin VB.PictureBox picCommands 
      BorderStyle     =   0  'None
      Height          =   330
      Left            =   60
      ScaleHeight     =   330
      ScaleWidth      =   1935
      TabIndex        =   4
      Top             =   60
      Width           =   1935
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   5
         Left            =   1605
         Picture         =   "XQuadrant.ctx":0312
         Style           =   1  'Graphical
         TabIndex        =   10
         Top             =   0
         Width           =   315
      End
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   0
         Left            =   0
         Picture         =   "XQuadrant.ctx":089C
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   0
         Width           =   315
      End
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   3
         Left            =   975
         Picture         =   "XQuadrant.ctx":0E26
         Style           =   1  'Graphical
         TabIndex        =   8
         Top             =   0
         Width           =   315
      End
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   1
         Left            =   330
         Picture         =   "XQuadrant.ctx":13B0
         Style           =   1  'Graphical
         TabIndex        =   6
         Top             =   0
         Width           =   315
      End
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   4
         Left            =   1290
         Picture         =   "XQuadrant.ctx":193A
         Style           =   1  'Graphical
         TabIndex        =   9
         Top             =   0
         Width           =   315
      End
      Begin VB.CommandButton cmdCmd 
         Height          =   315
         Index           =   2
         Left            =   660
         Picture         =   "XQuadrant.ctx":1EC4
         Style           =   1  'Graphical
         TabIndex        =   7
         Top             =   0
         Width           =   315
      End
      Begin VB.Image imgCmd 
         Height          =   240
         Index           =   4
         Left            =   1470
         Picture         =   "XQuadrant.ctx":224E
         Top             =   585
         Width           =   240
      End
      Begin VB.Image imgCmd 
         Height          =   240
         Index           =   3
         Left            =   1215
         Picture         =   "XQuadrant.ctx":2398
         Top             =   600
         Width           =   240
      End
      Begin VB.Image imgCmd 
         Height          =   240
         Index           =   2
         Left            =   930
         Picture         =   "XQuadrant.ctx":24E2
         Top             =   600
         Width           =   240
      End
      Begin VB.Image imgCmd 
         Height          =   240
         Index           =   1
         Left            =   660
         Picture         =   "XQuadrant.ctx":262C
         Top             =   600
         Width           =   240
      End
      Begin VB.Image imgCmd 
         Height          =   240
         Index           =   0
         Left            =   420
         Picture         =   "XQuadrant.ctx":2776
         Top             =   600
         Width           =   240
      End
   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        =   15
            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        =   14
            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 mnuMainQuadrantInfo 
         Caption         =   "Quadrant 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 = "XQuadrant"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private Type PointAPI   'API Point structure
    X   As Long
    Y   As Long
End Type

Private Declare Function Polygon Lib "gdi32" (ByVal hDC As Long, lpPoint As PointAPI, ByVal nCount As Long) As Long

Private uColumnsHeight()        As Double   'array of column height values
Private uColumnsBase()          As Double   'array of column bases values
                                            'used to determine hittest feature.

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

⌨️ 快捷键说明

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