home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frmMain
- Caption = "First Impression Chart Type Examples"
- ClientHeight = 5655
- ClientLeft = 1110
- ClientTop = 1725
- ClientWidth = 9495
- Height = 6405
- Icon = "chartfrm.frx":0000
- Left = 1020
- LinkTopic = "Form1"
- ScaleHeight = 5655
- ScaleWidth = 9495
- Top = 1065
- Width = 9675
- Begin VB.Frame fraControls
- Height = 735
- Left = 0
- TabIndex = 1
- Top = 0
- Width = 9495
- Begin VB.ComboBox cboChartType
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H00FF0000&
- Height = 360
- Left = 6480
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 240
- Width = 2895
- End
- Begin Threed.SSCommand SSCommand5
- Height = 375
- Left = 5160
- TabIndex = 19
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":030A
- End
- Begin Threed.SSCommand SSCommand17
- Height = 375
- Left = 1560
- TabIndex = 7
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":0A1C
- End
- Begin Threed.SSCommand SSCommand16
- Height = 375
- Left = 6000
- TabIndex = 18
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Caption = "nD"
- ForeColor = 16711680
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- End
- Begin Threed.SSCommand SSCommand15
- Height = 375
- Left = 5640
- TabIndex = 17
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Caption = "!"
- ForeColor = 16711680
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- End
- Begin Threed.SSCommand SSCommand14
- Height = 375
- Left = 4800
- TabIndex = 16
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":0BCE
- End
- Begin Threed.SSCommand SSCommand13
- Height = 375
- Left = 4440
- TabIndex = 15
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":0D80
- End
- Begin Threed.SSCommand SSCommand12
- Height = 375
- Left = 4080
- TabIndex = 14
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":0F32
- End
- Begin Threed.SSCommand SSCommand11
- Height = 375
- Left = 3720
- TabIndex = 13
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":10E4
- End
- Begin Threed.SSCommand SSCommand10
- Height = 375
- Left = 3360
- TabIndex = 12
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":1296
- End
- Begin Threed.SSCommand SSCommand9
- Height = 375
- Left = 3000
- TabIndex = 11
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":1448
- End
- Begin Threed.SSCommand SSCommand8
- Height = 375
- Left = 2640
- TabIndex = 10
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":15FA
- End
- Begin Threed.SSCommand SSCommand7
- Height = 375
- Left = 2280
- TabIndex = 9
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":17AC
- End
- Begin Threed.SSCommand SSCommand6
- Height = 375
- Left = 1920
- TabIndex = 8
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":195E
- End
- Begin Threed.SSCommand SSCommand4
- Height = 375
- Left = 1200
- TabIndex = 6
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":1B10
- End
- Begin Threed.SSCommand SSCommand3
- Height = 375
- Left = 840
- TabIndex = 5
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":1CC2
- End
- Begin Threed.SSCommand SSCommand2
- Height = 375
- Left = 480
- TabIndex = 4
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":1E74
- End
- Begin Threed.SSCommand SSCommand1
- Height = 375
- Left = 120
- TabIndex = 3
- Top = 240
- Width = 375
- _Version = 65536
- _ExtentX = 661
- _ExtentY = 661
- _StockProps = 78
- Picture = "chartfrm.frx":2026
- End
- End
- Begin MSComDlg.CommonDialog CommonDialog1
- Left = 8160
- Top = 840
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- End
- Begin VCIFiLib.VtChart VtChart1
- Height = 3975
- Left = 240
- TabIndex = 0
- Top = 1020
- Width = 4215
- _version = 65536
- _extentx = 7435
- _extenty = 7011
- _stockprops = 96
- filename = "chartfrm.frx":21D8
- End
- Begin VB.Menu File
- Caption = "&File"
- Begin VB.Menu FileRead
- Caption = "Read Chart (VTC)..."
- End
- Begin VB.Menu FileWrite
- Caption = "WriteChart (VTC)..."
- WindowList = -1 'True
- End
- Begin VB.Menu FileSep0
- Caption = "-"
- End
- Begin VB.Menu FileMeta
- Caption = "Write Metafile"
- End
- Begin VB.Menu WriteBMP
- Caption = "Write Bitmap File..."
- End
- Begin VB.Menu FileSep1
- Caption = "-"
- End
- Begin VB.Menu FilePrinterSetup
- Caption = "Printer Setup..."
- End
- Begin VB.Menu FilePrint
- Caption = "&Print"
- End
- Begin VB.Menu FileSep2
- Caption = "-"
- End
- Begin VB.Menu FileExit
- Caption = "E&xit"
- End
- End
- Begin VB.Menu Edit
- Caption = "&Edit"
- Begin VB.Menu EditCopy
- Caption = "&Copy"
- End
- Begin VB.Menu EditPaste
- Caption = "&Paste"
- End
- End
- Begin VB.Menu Data
- Caption = "&Data"
- Begin VB.Menu DataShow
- Caption = "Show Data"
- End
- End
- Begin VB.Menu Test
- Caption = "Test"
- Begin VB.Menu TestOne
- Caption = "Test One"
- End
- Begin VB.Menu TestAll
- Caption = "Test All"
- End
- Begin VB.Menu TestLights
- Caption = "View Lights"
- End
- End
- Begin VB.Menu About
- Caption = "About"
- Begin VB.Menu ATD
- Caption = "About This Demo"
- End
- End
- Attribute VB_Name = "frmMain"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub ATD_Click()
- Dim LF$
- LF = Chr$(10)
- MsgBox "Click on the chart pieces to select or drag " & _
- "them (including dragging pie pieces)." & LF & LF & _
- "Double Click on the chart pieces to invoke " & _
- "the user interface." & LF & LF & _
- "Select a data series and Shift-Double Click " & _
- "to display the series number." & LF & LF & _
- "Select a data point and Shift-Double Click " & _
- "to display the data point value." & LF & LF & _
- "Hold down the control key and drag the mouse " & _
- "to rotate 3D charts."
- End Sub
- Private Sub cboChartType_Click()
- With cboChartType
- Select Case LastChartType
-
- Case ButtonVBar ' Vertical Bar Charts
- VBarIndex = .ListIndex
- Call VBarChart
-
- Case ButtonHBar
- HBarIndex = .ListIndex
- Call HBarChart
-
- Case ButtonLine
- LineIndex = .ListIndex
- Call LineChart
-
- Case ButtonArea
- AreaIndex = .ListIndex
- Call AreaChart
-
- Case ButtonStep
- StepIndex = .ListIndex
- Call StepChart
-
- Case ButtonCombo
- ComboIndex = .ListIndex
- Call ComboChart
-
- Case ButtonPie
- PieIndex = .ListIndex
- Call PieChart
-
- Case ButtonXY
- XYIndex = .ListIndex
- Call XYChart
-
- Case ButtonPolar
- PolarIndex = .ListIndex
- Call PolarChart
-
- Case ButtonRadar
- RadarIndex = .ListIndex
- Call RadarChart
-
- Case ButtonBubble
- BubbleIndex = .ListIndex
- Call BubbleChart
-
- Case ButtonDoughnut
- DoughnutIndex = .ListIndex
- Call DoughnutChart
-
- Case ButtonHiLow
- HilowIndex = .ListIndex
- Call HiLowChart
-
- Case ButtonGantt
- GanttIndex = .ListIndex
- Call GanttChart
-
- Case ButtonOption
- OptionIndex = .ListIndex
- Call OptionChart
-
- Case ButtonMulti
- MultiIndex = .ListIndex
- Call MultiChart
-
- Case ButtonSChart
- SChartIndex = .ListIndex
- Call SurfaceChart
-
- Case Else
- MsgBox "Add case to listbox event"
- End Select
- End With
- End Sub
- Private Sub Command1_Click()
- End Sub
- Private Sub DataRead_Click()
- End Sub
- Private Sub DataWrite_Click()
- End Sub
- Private Sub SSCommand1_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
-
- .AddItem "2D Bar"
- .AddItem "2D Labeled"
- .AddItem "2D +/- Data"
- .AddItem "2D Picture Bars Tiled"
- .AddItem "2D Picture Bars Stretch"
- .AddItem "2D Stacked"
- .AddItem "2D Stacked Percent"
-
- .AddItem "3D Bar"
- .AddItem "3D Labeled"
- .AddItem "3D Bar Styles"
- .AddItem "3D Bar Walls"
- .AddItem "3D Clustered"
- .AddItem "3D +/- Floating"
-
- 'cboChartType.AddItem "2D Skip Labels"
-
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonVBar Then
- VBarIndex = VBarIndex + 1
- If VBarIndex = .ListCount Then VBarIndex = 0
- Else
- VBarIndex = 0
- End If
- LastChartType = ButtonVBar
- .ListIndex = VBarIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand10_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Radar"
- .AddItem "2D No Axis"
- .AddItem "2D Area"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonRadar Then
- RadarIndex = RadarIndex + 1
- If RadarIndex = .ListCount Then RadarIndex = 0
- Else
- RadarIndex = 0
- End If
- LastChartType = ButtonRadar
- .ListIndex = RadarIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand11_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "Bubble"
- .AddItem "Bubble Ratio"
- .AddItem "Bubble Labels"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonBubble Then
- BubbleIndex = BubbleIndex + 1
- If BubbleIndex = .ListCount Then BubbleIndex = 0
- Else
- BubbleIndex = 0
- End If
- LastChartType = ButtonBubble
- .ListIndex = BubbleIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand16_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Multi-Dimensional"
- .AddItem "3D Multi-Dimensional"
- .AddItem "3D Multi-Dimensional Pie"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonMulti Then
- MultiIndex = MultiIndex + 1
- If MultiIndex = .ListCount Then MultiIndex = 0
- Else
- MultiIndex = 0
- End If
- LastChartType = ButtonMulti
- .ListIndex = MultiIndex
- End With
- End Sub
- Private Sub SSCommand15_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "Title Fill Backdrop"
- .AddItem "Title Gradient Backdrop"
- .AddItem "Title Picture Backdrop"
- .AddItem "BD Gradient Rectangle"
- .AddItem "BD Gradient Oval"
- .AddItem "BD Gradient Horizontal"
- .AddItem "BD Gradient Vertical"
- .AddItem "BD Picture Tiled"
- .AddItem "Plot Gradient"
- .AddItem "Plot BMP Picture"
- .AddItem "Plot WMF Picture"
- .AddItem "Projection Oblique"
- .AddItem "Projection Perspective"
- .AddItem "Highlighted Area"
- .AddItem "Stick Chart"
- .AddItem "Bar (Surface)"
- .AddItem "Area Background"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonOption Then
- OptionIndex = OptionIndex + 1
- If OptionIndex = .ListCount Then OptionIndex = 0
- Else
- OptionIndex = 0
- End If
- LastChartType = ButtonOption
- .ListIndex = OptionIndex
- End With
- End Sub
- Private Sub SSCommand13_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "Hi-Low"
- .AddItem "Hi-Low-Close"
- .AddItem "Open-Hi-Low-Close"
- .AddItem "Hi-Low-Close Sidebar"
- .AddItem "Hi-Low-Close Filled"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonHiLow Then
- HilowIndex = HilowIndex + 1
- If HilowIndex = .ListCount Then HilowIndex = 0
- Else
- HilowIndex = 0
- End If
- LastChartType = ButtonHiLow
- .ListIndex = HilowIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand14_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Gantt"
- .AddItem "2D Labeled"
- .AddItem "2D Multiple Series"
- .AddItem "2D Picture Bars"
- .AddItem "3D Gantt"
- .AddItem "3D Labeled"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonGantt Then
- GanttIndex = GanttIndex + 1
- If GanttIndex = .ListCount Then GanttIndex = 0
- Else
- GanttIndex = 0
- End If
- LastChartType = ButtonGantt
- .ListIndex = GanttIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand2_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Horizontal Bar"
- .AddItem "2D Labeled"
- .AddItem "2D +/- Data"
- .AddItem "2D Picture Bars"
- .AddItem "2D Stacked"
- .AddItem "2D Stacked Percent"
- .AddItem "3D Horizontal Bar"
- .AddItem "3D Labeled"
- .AddItem "3D Thick Walls"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonHBar Then
- HBarIndex = HBarIndex + 1
- If HBarIndex = .ListCount Then HBarIndex = 0
- Else
- HBarIndex = 0
- End If
- LastChartType = ButtonHBar
- .ListIndex = HBarIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand3_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Line"
- .AddItem "2D Point Labels"
- .AddItem "2D Series Labels"
- .AddItem "2D +/- Data"
- .AddItem "2D Smoothed"
- .AddItem "2D Markers"
- .AddItem "2D Line Styles"
- .AddItem "2D Thick Lines"
- .AddItem "2D Log Axis"
- .AddItem "2D 2nd Y Axis"
- .AddItem "2D Missing Data"
- .AddItem "2D Statistics"
- .AddItem "2D Guidelines"
- .AddItem "3D Line"
- .AddItem "3D Labeled"
- .AddItem "3D Smoothed"
- .AddItem "3D Line Styles"
- 'cboChartType.AddItem "3D Guidelines"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonLine Then
- LineIndex = LineIndex + 1
- If LineIndex = .ListCount Then LineIndex = 0
- Else
- LineIndex = 0
- End If
- LastChartType = ButtonLine
- .ListIndex = LineIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand12_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "3D Doughnut"
- .AddItem "3D Multiple Doughnuts"
- .AddItem "3D Exploded Pieces"
- .AddItem "3D Labels"
- .AddItem "3D Weighting"
- .AddItem "3D Interior"
- .AddItem "3D Thickness"
- .AddItem "3D Shapes 5 Sides"
- .AddItem "3D Shapes Cylinder"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonDoughnut Then
- DoughnutIndex = DoughnutIndex + 1
- If DoughnutIndex = .ListCount Then DoughnutIndex = 0
- Else
- DoughnutIndex = 0
- End If
- LastChartType = ButtonDoughnut
- .ListIndex = DoughnutIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand4_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Area"
- .AddItem "2D Stacked"
- .AddItem "2D Smoothed"
- .AddItem "2D Guide Lines"
- .AddItem "3D Area"
- .AddItem "3D Labeled"
- .AddItem "3D Wide"
- .AddItem "3D Smoothed"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonArea Then
- AreaIndex = AreaIndex + 1
- If AreaIndex = .ListCount Then AreaIndex = 0
- Else
- AreaIndex = 0
- End If
- LastChartType = ButtonArea
- .ListIndex = AreaIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand17_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Step"
- .AddItem "2D Stacked"
- 'cboChartType.AddItem "2D Guide Lines"
- .AddItem "3D Step"
- .AddItem "3D Labeled"
- .AddItem "3D Wide"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonStep Then
- StepIndex = StepIndex + 1
- If StepIndex = .ListCount Then StepIndex = 0
- Else
- StepIndex = 0
- End If
- LastChartType = ButtonStep
- .ListIndex = StepIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand5_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
-
- .AddItem "2D Countour Lines"
- .AddItem "2D Countour Bands"
- .AddItem "3D Surface"
- .AddItem "3D Surface (Pedestal)"
- .AddItem "3D Surface (Gradients)"
- .AddItem "3D Surface (Wireframe)"
-
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonSChart Then
- SChartIndex = SChartIndex + 1
- If SChartIndex = .ListCount Then SChartIndex = 0
- Else
- SChartIndex = 0
- End If
- LastChartType = ButtonSChart
- .ListIndex = SChartIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand6_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Line/Bar"
- .AddItem "2D Hi-Low/Bar"
- .AddItem "3D Line/Bar"
- .AddItem "3D Line/Bar/Area"
- .AddItem "3D Step/Area"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonCombo Then
- ComboIndex = ComboIndex + 1
- If ComboIndex = .ListCount Then ComboIndex = 0
- Else
- ComboIndex = 0
- End If
- LastChartType = ButtonCombo
- .ListIndex = ComboIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand7_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Pie Chart"
- .AddItem "2D Multiple Pies"
- .AddItem "2D Exploded Pieces"
- .AddItem "2D Labels"
- .AddItem "2D Weighting"
- .AddItem "2D Start Angle"
- .AddItem "2D Sorting"
- .AddItem "3D Pie Chart"
- .AddItem "3D Multiple Pies"
- .AddItem "3D Exploded Pieces"
- .AddItem "3D Labels"
- .AddItem "3D Thick"
- .AddItem "3D Thin"
- .AddItem "3D Top Radius"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonPie Then
- PieIndex = PieIndex + 1
- If PieIndex = .ListCount Then PieIndex = 0
- Else
- PieIndex = 0
- End If
- LastChartType = ButtonPie
- .ListIndex = PieIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand8_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D XY"
- .AddItem "2D Markers"
- .AddItem "2D Picture Markers"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonXY Then
- XYIndex = XYIndex + 1
- If XYIndex = .ListCount Then XYIndex = 0
- Else
- XYIndex = 0
- End If
- LastChartType = ButtonXY
- .ListIndex = XYIndex
- End With
- ' Display the new chart
- End Sub
- Private Sub SSCommand9_Click()
- ' Fill the chart list drop down box
- With cboChartType
- .Clear
- .AddItem "2D Polar"
- .AddItem "2D No Axis"
- .AddItem "2D Start Angle"
- .AddItem "2D Line Styles"
- ' If the chart type changes then start at the top of the list
- ' If the chart type is the same then increment the chart
- If LastChartType = ButtonPolar Then
- PolarIndex = PolarIndex + 1
- If PolarIndex = .ListCount Then PolarIndex = 0
- Else
- PolarIndex = 0
- End If
- LastChartType = ButtonPolar
- .ListIndex = PolarIndex
- End With
- End Sub
- Private Sub CycleButton(TheButton As SSCommand)
- Dim i%
- TheButton.Value = True
- Refresh
- vtchart1.Repaint = True
- For i = 1 To cboChartType.ListCount - 1
- TheButton.Value = True
- Refresh '' let the chart paint
- cboChartType.Refresh '' identify the chart
- Next i
- End Sub
- Private Sub DataShow_Click()
- frmData.show
- frmData.Refresh
- End Sub
- Private Sub EditCopy_Click()
- vtchart1.EditCopy
- End Sub
- Private Sub EditPaste_Click()
- vtchart1.EditPaste
- End Sub
- Private Sub FileExit_Click()
- End
- End Sub
- Private Sub FileMeta_Click()
- On Error GoTo WriteWMFError
- With CommonDialog1
- .DialogTitle = "Write First Impression Metafile"
- .DefaultExt = "wmf"
- .Filter = "Metafiles|*.wmf"
- .flags = &H2
- .CancelError = True
- .InitDir = App.Path
- .ShowSave
-
- vtchart1.WritePictureToFile .filename, VtPictureTypeWMF, 0
- End With
- Exit Sub
- WriteWMFError:
- MsgBox Error
- End Sub
- Private Sub FilePrint_Click()
- vtchart1.PrintChart
- End Sub
- Private Sub FilePrinterSetup_Click()
- vtchart1.PrintSetupDialog
- End Sub
- Private Sub FileRead_Click()
- Dim cherror&
- On Error GoTo FileReadError
- With CommonDialog1
- .DialogTitle = "Read First Impression Chart"
- .DefaultExt = "vtc"
- .Filter = "First Impression Chart|*.vtc"
- .flags = &H1000
- .CancelError = True
- .InitDir = App.Path
- .ShowOpen
-
- vtchart1.ReadFromFile .filename
- End With
- Exit Sub
- FileReadError:
- MsgBox Error
- End Sub
- Private Sub FileWrite_Click()
- Dim cherror&
- On Error GoTo FileWriteError
- With CommonDialog1
- .DialogTitle = "Write First Impression Chart"
- .DefaultExt = "vtc"
- .Filter = "First Impression Chart|*.vtc"
- .flags = &H2
- .CancelError = True
- .InitDir = App.Path
- .ShowSave
- vtchart1.WriteToFile .filename
- End With
- Exit Sub
- FileWriteError:
- MsgBox Error
- End Sub
- Private Sub Form_Load()
- ' Set the window up
- Top = 0
- Left = 0
- Height = 7200
- Width = 9615
- ' Size the chart inside the window
- vtchart1.Top = fraControls.Top + fraControls.Height + 50
- vtchart1.Left = fraControls.Left
- vtchart1.Width = ScaleWidth - vtchart1.Left - 30
- vtchart1.Height = ScaleHeight - vtchart1.Top - 30
- fraControls.Width = ScaleWidth - fraControls.Left - 30
- ' Initialize chart list variables
- 'LastChartType = ButtonVBar
- VBarIndex = -1
- HBarIndex = -1
- LineIndex = -1
- AreaIndex = -1
- StepIndex = -1
- ComboIndex = -1
- PieIndex = -1
- XYIndex = -1
- PolarIndex = -1
- RadarIndex = -1
- BubbleIndex = -1
- DoughnutIndex = -1
- HilowIndex = -1
- GanttIndex = -1
- OptionIndex = -1
- MultiIndex = -1
- SChartIndex = -1
- ' Display the initial chart
- SSCommand1 = True
- End Sub
- Private Sub Form_Resize()
- If ScaleWidth > 1000 And ScaleHeight > 1000 Then
- With vtchart1
- .Repaint = False
- .Width = frmMain.ScaleWidth - .Left - 30
- .Height = frmMain.ScaleHeight - .Top - 30
- .Repaint = True
- End With
- fraControls.Width = ScaleWidth - fraControls.Left - 30
- End If
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- End
- End Sub
- Private Sub TestAll_Click()
- Call CycleButton(SSCommand1)
- Call CycleButton(SSCommand2)
- Call CycleButton(SSCommand3)
- Call CycleButton(SSCommand4)
- Call CycleButton(SSCommand17)
- Call CycleButton(SSCommand6)
- Call CycleButton(SSCommand7)
- Call CycleButton(SSCommand8)
- Call CycleButton(SSCommand9)
- Call CycleButton(SSCommand10)
- Call CycleButton(SSCommand11)
- Call CycleButton(SSCommand12)
- Call CycleButton(SSCommand13)
- Call CycleButton(SSCommand14)
- Call CycleButton(SSCommand15)
- Call CycleButton(SSCommand16)
- Call CycleButton(SSCommand5)
- End Sub
- Private Sub TestLights_Click()
- Dim i%, light As Object
- For Each light In vtchart1.Plot.light.LightSources
- MsgBox "Light Information" & Chr$(13) & _
- "Intensity: " & light.Intensity & Chr$(13) & _
- "X: " & Chr$(9) & light.X & Chr$(13) & _
- "Y: " & Chr$(9) & light.Y & Chr$(13) & _
- "Z: " & Chr$(9) & light.Z & Chr$(13)
- Next light
- ' Turn off all current lights
- With vtchart1.Plot.light.LightSources
- For i = 1 To .Count
- .Remove (i)
- Next i
- End With
- ' Set the new light
- vtchart1.Plot.light.LightSources.Add -1, -1, -1, 1
- End Sub
- Private Sub TestOne_Click()
- Dim i%
- ' Reset all chart options
- Call DefaultChart
- Call QReadData(App.Path + VBARDATA1)
- With frmMain.vtchart1
- For i = 1 To 50
- .ChartType = VtChChartType3dBar
- Refresh
- .ChartType = VtChChartType2dBar
- Refresh
- Next i
- End With
- End Sub
- Private Sub VtChart1_PointActivated(series As Integer, dataPoint As Integer, mouseFlags As Integer, Cancel As Integer)
- Dim flags As Integer
- Dim TheData As Double
- flags = mouseFlags And VtChMouseFlagShiftKeyDown
- If flags Then
- frmMain.vtchart1.Row = dataPoint
- frmMain.vtchart1.Column = series
- TheData = frmMain.vtchart1.Data
- MsgBox "Series:" & Str$(series) & Chr$(10) & " Point:" & Str$(dataPoint) & Chr$(10) & " Data:" & Str$(TheData)
- Cancel = True ' Flag to bypass the UI
- End If
- End Sub
- Private Sub VtChart1_SeriesActivated(series As Integer, mouseFlags As Integer, Cancel As Integer)
- Dim flags As Integer
- Dim a As String
- flags = mouseFlags And VtChMouseFlagShiftKeyDown
- If flags Then
- a = "Series:" & Str$(series) + Chr$(10) + Chr$(10) + "Select a single data point before"
- a = a + Chr$(10) + "Shift-Double Clicking to see its value."
- MsgBox a
- Cancel = True ' Flag to bypass the UI
- End If
- End Sub
- Private Sub WriteBMP_Click()
- On Error GoTo WriteBitmapError
- With CommonDialog1
- .DialogTitle = "Write First Impression Bitmap"
- .DefaultExt = "bmp"
- .Filter = "Bitmaps|*.bmp"
- .flags = &H2
- .CancelError = True
- .InitDir = App.Path
- .ShowSave
-
- vtchart1.WritePictureToFile .filename, VtPictureTypeBMP, 0
- End With
- Exit Sub
- WriteBitmapError:
- MsgBox Error
- End Sub
-