⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄

📁 VB开发的ERP系统
💻
📖 第 1 页 / 共 2 页
字号:
      _ExtentY        =   1005
      ButtonWidth     =   1164
      ButtonHeight    =   953
      Appearance      =   1
      Style           =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   6
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "3D效果"
            Key             =   "lt"
            ImageKey        =   "lt"
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "打印"
            Key             =   "dy"
            ImageKey        =   "dy"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "帮助"
            Key             =   "bz"
            ImageKey        =   "bz"
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出"
            Key             =   "tc"
            ImageKey        =   "tc"
         EndProperty
      EndProperty
      BorderStyle     =   1
      Begin TeeChart.TeeCommander TeeCommander1 
         Height          =   495
         Left            =   3210
         OleObjectBlob   =   "系统_图形分析窗体.frx":20ED2
         TabIndex        =   3
         Top             =   30
         Width           =   7005
      End
      Begin MSComDlg.CommonDialog CommonDialog1 
         Left            =   8310
         Top             =   90
         _ExtentX        =   847
         _ExtentY        =   847
         _Version        =   393216
      End
   End
End
Attribute VB_Name = "XT_TxfxFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Tx3d As Boolean                   '图形3D设置
Dim Dqtxlx As String                  '当前分析图类型

Private Sub Command1_Click()
    
    With Txfxchart.Aspect
        If .View3d = True Then
            .Zoom = 100
            .Rotation = 345
            .Elevation = 345
            .HorizOffset = 0
            .VertOffset = 0
            .Perspective = 15
            .Orthogonal = True
            .Chart3DPercent = 15
        End If
    End With
    
End Sub

Private Sub Command2_Click()
    
End Sub

Private Sub Form_Load()
    
    TeeCommander1.Chart = Txfxchart
    Tx3d = False
    Dqtxlx = "bar"
    'Call Xzsctxlx(Dqtxlx)
    
    StatusBar1.Panels(1).Text = "图形类型:" + Dqtxlx
    StatusBar1.Panels(2).Text = "二维效果"
    
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)           '选择分析图类型
    
    Call Xzsctxlx(Button.Key)
    Dqtxlx = Button.Key
    
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)           '菜 单 选 项
    Select Case Button.Key
    Case "lt"                               '视觉效果
        If Tx3d Then
            Tx3d = False
            Txfxchart.Aspect.View3d = False
            Button.Caption = "3D效果"
            StatusBar1.Panels(2).Text = "二维效果"
            With Toolbar1.Buttons
                .Item("bubble").Enabled = True
                .Item("contour").Enabled = True
                .Item("xy").Enabled = True
                .Item("polar").Enabled = True
                .Item("radar").Enabled = True
            End With
        Else
            Tx3d = True
            Button.Caption = "2D效果"
            Txfxchart.Aspect.View3d = True
            StatusBar1.Panels(2).Text = "三维效果"
            With Toolbar1.Buttons
                .Item("bubble").Enabled = False
                .Item("contour").Enabled = False
                .Item("xy").Enabled = False
                .Item("polar").Enabled = False
                .Item("radar").Enabled = False
            End With
        End If
        ' Call Xzsctxlx(Dqtxlx)
    Case "dy"                                    '打 印
        With Txfxchart
            CommonDialog1.CancelError = True
            
            On Error GoTo Cwcl2:
            
            CommonDialog1.ShowPrinter
            .PrintInformation.Orientation = VtPrintOrientationLandscape '横向打印
            .PrintInformation.PrintCopies (CommonDialog1.Copies)
        End With
Cwcl2:
        Exit Sub
    Case "tc"
        Unload Me
    End Select
    
End Sub

Private Sub Xzsctxlx(Txlx As String)                           '选择分析图类型
    
    Dim i As Integer
    With Txfxchart
        'If Not Tx3d Then
        'Select Case Txlx
        'Case "area"
        '.charttype = VtChChartType2dArea
        'Case "bar"
        '.charttype = VtChChartType2dBar
        'Case "line"
        '.charttype = VtChChartType2dLine
        'Case "step"
        '.charttype = VtChChartType2dStep
        'Case "combination"
        '.charttype = VtChChartType2dCombination
        'Case "pie"
        '.charttype = VtChChartType2dPie
        'Case "horzbar"
        '.charttype = VtChChartType2dHorizontalBar
        'Case "hilo"
        '.charttype = VtChChartType2dHiLo
        'Case "gantt"
        '.charttype = VtChChartType2dGantt
        'Case "bubble"
        '.charttype = VtChChartType2dBubble
        'Case "contour"
        '.charttype = VtChChartType2dContour
        'Case "xy"
        '.charttype = VtChChartType2dXY
        'Case "polar"
        '.charttype = VtChChartType2dPolar
        'Case "radar"
        '.charttype = VtChChartType2dRadar
        'End Select
        'Else
        Select Case Txlx
        Case "area"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scArea
            Next i
        Case "bar"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scBar
            Next i
        Case "line"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scLine
            Next i
        Case "step"
            'For i = 0 To .SeriesCount - 1
            '.ChangeSeriesType i, scShape
            'Next i
        Case "combination"
            'For i = 0 To .SeriesCount - 1
            '   .ChangeSeriesType i, scContour
            'Next i
        Case "pie"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scPie
            Next i
        Case "horzbar"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scHorizBar
            Next i
        Case "hilo"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scPoint
            Next i
        Case "gantt"
            For i = 0 To .SeriesCount - 1
                .ChangeSeriesType i, scFastLine
            Next i
        End Select
        'End If
        'StatusBar1.Panels(1).Text = "图形类型:" + Dqtxlx
    End With
    
End Sub

Private Sub Txfxchart_OnSeriesBeforeDrawValues(ByVal SeriesIndex As Long)
    
    With Txfxchart
        If .Series(SeriesIndex).SeriesType = scPie Then
            Select Case SeriesIndex
            Case 0: .ChartRect 0, 0, .Canvas.Width * 6 / 16, .Canvas.Height / 2
            Case 1: .ChartRect .Canvas.Width * 5 / 16, 0, .Canvas.Width * 11 / 16, .Canvas.Height / 2
            Case 2: .ChartRect 0, .Canvas.Height / 2, .Canvas.Width * 6 / 16, .Canvas.Height
            Case 3: .ChartRect .Canvas.Width * 5 / 16, .Canvas.Height / 2, .Canvas.Width * 11 / 16, .Canvas.Height
            Case 4: .ChartRect .Canvas.Width * 9 / 16, .Canvas.Height / 5, .Canvas.Width, .Canvas.Height * 4 / 5
            End Select
        End If
    End With
    
End Sub

⌨️ 快捷键说明

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