上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:13k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
  4. Object = "{008BBE7B-C096-11D0-B4E3-00A0C901D681}#1.0#0"; "teechart.ocx"
  5. Begin VB.Form XT_TxfxFrm 
  6.    Caption         =   "资产总帐分析"
  7.    ClientHeight    =   7590
  8.    ClientLeft      =   2355
  9.    ClientTop       =   1845
  10.    ClientWidth     =   11280
  11.    HelpContextID   =   505004
  12.    Icon            =   "系统_图形分析窗体.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   7590
  15.    ScaleWidth      =   11280
  16.    Begin TeeChart.TChart Txfxchart 
  17.       Height          =   6540
  18.       Left            =   450
  19.       OleObjectBlob   =   "系统_图形分析窗体.frx":1042
  20.       TabIndex        =   6
  21.       Top             =   600
  22.       Width           =   10740
  23.    End
  24.    Begin VB.CommandButton Command1 
  25.       Caption         =   "Command1"
  26.       Height          =   495
  27.       Left            =   2010
  28.       TabIndex        =   4
  29.       Top             =   930
  30.       Width           =   1065
  31.    End
  32.    Begin MSComctlLib.StatusBar StatusBar1 
  33.       Align           =   2  'Align Bottom
  34.       Height          =   405
  35.       Left            =   0
  36.       TabIndex        =   1
  37.       Top             =   7185
  38.       Width           =   11280
  39.       _ExtentX        =   19897
  40.       _ExtentY        =   714
  41.       _Version        =   393216
  42.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  43.          NumPanels       =   1
  44.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  45.             AutoSize        =   1
  46.             Object.Width           =   19368
  47.             Text            =   "3D效果"
  48.             TextSave        =   "3D效果"
  49.          EndProperty
  50.       EndProperty
  51.    End
  52.    Begin MSComctlLib.Toolbar Toolbar2 
  53.       Align           =   1  'Align Top
  54.       Height          =   555
  55.       Left            =   0
  56.       TabIndex        =   2
  57.       Top             =   0
  58.       Width           =   11280
  59.       _ExtentX        =   19897
  60.       _ExtentY        =   979
  61.       ButtonWidth     =   820
  62.       ButtonHeight    =   926
  63.       Appearance      =   1
  64.       Style           =   1
  65.       ImageList       =   "ImageList2"
  66.       DisabledImageList=   "ImageList2"
  67.       HotImageList    =   "ImageList2"
  68.       _Version        =   393216
  69.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  70.          NumButtons      =   7
  71.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  72.             Caption         =   "打印"
  73.             Key             =   "dy"
  74.             ImageKey        =   "dy"
  75.          EndProperty
  76.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  77.             Style           =   3
  78.          EndProperty
  79.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  80.             Caption         =   "3D"
  81.             Key             =   "lt"
  82.             ImageKey        =   "3d"
  83.          EndProperty
  84.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  85.             Caption         =   "项目"
  86.             Key             =   "item"
  87.             ImageKey        =   "item"
  88.          EndProperty
  89.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  90.             Style           =   3
  91.          EndProperty
  92.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  93.             Caption         =   "帮助"
  94.             Key             =   "bz"
  95.             ImageKey        =   "bz"
  96.          EndProperty
  97.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  98.             Caption         =   "退出"
  99.             Key             =   "tc"
  100.             ImageKey        =   "fh"
  101.          EndProperty
  102.       EndProperty
  103.       BorderStyle     =   1
  104.       Begin MSComctlLib.ImageList ImageList2 
  105.          Left            =   6210
  106.          Top             =   -30
  107.          _ExtentX        =   1005
  108.          _ExtentY        =   1005
  109.          BackColor       =   -2147483643
  110.          ImageWidth      =   16
  111.          ImageHeight     =   16
  112.          MaskColor       =   12632256
  113.          _Version        =   393216
  114.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  115.             NumListImages   =   11
  116.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  117.                Picture         =   "系统_图形分析窗体.frx":10F4
  118.                Key             =   ""
  119.             EndProperty
  120.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  121.                Picture         =   "系统_图形分析窗体.frx":148E
  122.                Key             =   ""
  123.             EndProperty
  124.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  125.                Picture         =   "系统_图形分析窗体.frx":1828
  126.                Key             =   ""
  127.             EndProperty
  128.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  129.                Picture         =   "系统_图形分析窗体.frx":1BC2
  130.                Key             =   ""
  131.             EndProperty
  132.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  133.                Picture         =   "系统_图形分析窗体.frx":1F5C
  134.                Key             =   ""
  135.             EndProperty
  136.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  137.                Picture         =   "系统_图形分析窗体.frx":22F6
  138.                Key             =   ""
  139.             EndProperty
  140.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  141.                Picture         =   "系统_图形分析窗体.frx":2690
  142.                Key             =   "3d"
  143.             EndProperty
  144.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  145.                Picture         =   "系统_图形分析窗体.frx":2A2A
  146.                Key             =   "dy"
  147.             EndProperty
  148.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  149.                Picture         =   "系统_图形分析窗体.frx":2DC4
  150.                Key             =   "bz"
  151.             EndProperty
  152.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  153.                Picture         =   "系统_图形分析窗体.frx":315E
  154.                Key             =   "fh"
  155.             EndProperty
  156.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  157.                Picture         =   "系统_图形分析窗体.frx":34F8
  158.                Key             =   "item"
  159.             EndProperty
  160.          EndProperty
  161.       End
  162.       Begin MSComDlg.CommonDialog CommonDialog1 
  163.          Left            =   6930
  164.          Top             =   30
  165.          _ExtentX        =   847
  166.          _ExtentY        =   847
  167.          _Version        =   393216
  168.       End
  169.    End
  170.    Begin MSComctlLib.Toolbar Toolbar1 
  171.       Align           =   3  'Align Left
  172.       Height          =   6630
  173.       Left            =   0
  174.       TabIndex        =   0
  175.       Top             =   555
  176.       Width           =   420
  177.       _ExtentX        =   741
  178.       _ExtentY        =   11695
  179.       ButtonWidth     =   1138
  180.       ButtonHeight    =   582
  181.       Appearance      =   1
  182.       TextAlignment   =   1
  183.       ImageList       =   "ImageList2"
  184.       DisabledImageList=   "ImageList2"
  185.       HotImageList    =   "ImageList2"
  186.       _Version        =   393216
  187.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  188.          NumButtons      =   7
  189.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  190.             Key             =   "area"
  191.             ImageIndex      =   1
  192.          EndProperty
  193.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  194.             Key             =   "bar"
  195.             ImageIndex      =   2
  196.          EndProperty
  197.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  198.             Key             =   "line"
  199.             ImageIndex      =   3
  200.          EndProperty
  201.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  202.             Key             =   "pie"
  203.             ImageIndex      =   4
  204.          EndProperty
  205.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  206.             Key             =   "horzbar"
  207.             ImageIndex      =   5
  208.          EndProperty
  209.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  210.             Key             =   "hilo"
  211.             ImageIndex      =   6
  212.          EndProperty
  213.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  214.             Key             =   "gantt"
  215.             Style           =   3
  216.          EndProperty
  217.       EndProperty
  218.    End
  219. End
  220. Attribute VB_Name = "XT_TxfxFrm"
  221. Attribute VB_GlobalNameSpace = False
  222. Attribute VB_Creatable = False
  223. Attribute VB_PredeclaredId = True
  224. Attribute VB_Exposed = False
  225. Dim Tx3d As Boolean                   '图形3D设置
  226. Dim Dqtxlx As String                  '当前分析图类型
  227. Public bbGrid As Object
  228. Public Txcode As String
  229. Private Sub Command1_Click()
  230.     
  231.     With Txfxchart.Aspect
  232.         If .View3D = True Then
  233.             .Zoom = 100
  234.             .Rotation = 345
  235.             .Elevation = 345
  236.             .HorizOffset = 0
  237.             .VertOffset = 0
  238.             .Perspective = 15
  239.             .Orthogonal = True
  240.             .Chart3DPercent = 15
  241.         End If
  242.     End With
  243. End Sub
  244. Private Sub Form_Load()
  245.     
  246.     TeeCommander1.Chart = Txfxchart
  247.     Tx3d = False
  248.     Dqtxlx = "bar"
  249.     StatusBar1.Panels(1).Text = "二维效果"
  250.   
  251. End Sub
  252. Private Sub Form_Resize()
  253.     
  254.     On Error Resume Next
  255.     
  256.     Txfxchart.Width = Me.Width - Txfxchart.Left - 100
  257.     Txfxchart.Height = Me.Height - Txfxchart.Top - 400 - StatusBar1.Height
  258. End Sub
  259. Private Sub Form_Unload(Cancel As Integer)
  260.     Unload XT_TxItem
  261. End Sub
  262. Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)           '选择分析图类型
  263.    
  264.     Call Xzsctxlx(Button.Key)
  265.     Dqtxlx = Button.Key
  266. End Sub
  267. Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)           '菜 单 选 项
  268.     Select Case Button.Key
  269.         Case "lt"                               '视觉效果
  270.             If Tx3d Then
  271.                 Tx3d = False
  272.                 Txfxchart.Aspect.View3D = False
  273.                 Button.Caption = "3D"
  274.                 StatusBar1.Panels(1).Text = "二维效果"
  275.             Else
  276.                 Tx3d = True
  277.                 Button.Caption = "2D"
  278.                 Txfxchart.Aspect.View3D = True
  279.                 StatusBar1.Panels(1).Text = "三维效果"
  280.             End If
  281.         Case "dy"                                    '打 印
  282.             With Txfxchart
  283.                 
  284.                 On Error GoTo Cwcl2:
  285.                 
  286.                 .Printer.ShowPreview
  287.             
  288.             End With
  289. Cwcl2:
  290.             Exit Sub
  291.         Case "item"
  292.             Call Txfxbb(bbGrid, Txcode)
  293.         Case "tc"
  294.             Unload Me
  295.         Case "bz"
  296.             SendKeys "{F1}"
  297.     End Select
  298. End Sub
  299. Private Sub Xzsctxlx(Txlx As String)                           '选择分析图类型
  300.     
  301.     Dim I As Integer
  302.     
  303.     With Txfxchart
  304.         Select Case Txlx
  305.             Case "area"
  306.                 For I = 0 To .SeriesCount - 1
  307.                     .ChangeSeriesType I, scArea
  308.                 Next I
  309.             Case "bar"
  310.                 For I = 0 To .SeriesCount - 1
  311.                     .ChangeSeriesType I, scBar
  312.                 Next I
  313.             Case "line"
  314.                 For I = 0 To .SeriesCount - 1
  315.                     .ChangeSeriesType I, scLine
  316.                 Next I
  317.             Case "step"
  318.                 'For i = 0 To .SeriesCount - 1
  319.                     '.ChangeSeriesType i, scShape
  320.                 'Next i
  321.             Case "combination"
  322.                 'For i = 0 To .SeriesCount - 1
  323.                 '   .ChangeSeriesType i, scContour
  324.                 'Next i
  325.             Case "pie"
  326.                 For I = 0 To .SeriesCount - 1
  327.                     .ChangeSeriesType I, scPie
  328.                 Next I
  329.             Case "horzbar"
  330.                 For I = 0 To .SeriesCount - 1
  331.                     .ChangeSeriesType I, scHorizBar
  332.                 Next I
  333.             Case "hilo"
  334.                 For I = 0 To .SeriesCount - 1
  335.                     .ChangeSeriesType I, scPoint
  336.                 Next I
  337.             Case "gantt"
  338.                 For I = 0 To .SeriesCount - 1
  339.                     .ChangeSeriesType I, scFastLine
  340.                 Next I
  341.         End Select
  342.     End With
  343. End Sub
  344. Private Sub Txfxchart_OnSeriesBeforeDrawValues(ByVal SeriesIndex As Long)
  345.     
  346.     With Txfxchart
  347.         If .Series(SeriesIndex).SeriesType = scPie Then
  348.             Select Case SeriesIndex
  349.                 Case 0: .ChartRect 0, 0, .Canvas.Width * 6 / 16, .Canvas.Height / 2
  350.                 Case 1: .ChartRect .Canvas.Width * 5 / 16, 0, .Canvas.Width * 11 / 16, .Canvas.Height / 2
  351.                 Case 2: .ChartRect 0, .Canvas.Height / 2, .Canvas.Width * 6 / 16, .Canvas.Height
  352.                 Case 3: .ChartRect .Canvas.Width * 5 / 16, .Canvas.Height / 2, .Canvas.Width * 11 / 16, .Canvas.Height
  353.                 Case 4: .ChartRect .Canvas.Width * 9 / 16, .Canvas.Height / 5, .Canvas.Width, .Canvas.Height * 4 / 5
  354.             End Select
  355.         End If
  356.     End With
  357. End Sub