home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form2
- BorderStyle = 1 'Fixed Single
- Caption = "CBDemo Options"
- Height = 4380
- Left = 7068
- LinkTopic = "Form2"
- MaxButton = 0 'False
- ScaleHeight = 3960
- ScaleWidth = 3132
- Top = 1116
- Width = 3228
- Begin CommandButton Command3
- Caption = "Cancel"
- Height = 372
- Left = 3360
- TabIndex = 10
- Top = 2280
- Visible = 0 'False
- Width = 732
- End
- Begin MaskEdBox MaskedEdit2
- Height = 288
- Left = 1920
- Mask = "##"
- MaxLength = 2
- PromptChar = "_"
- TabIndex = 9
- Top = 2400
- Width = 372
- End
- Begin MaskEdBox MaskedEdit1
- Height = 288
- Left = 1920
- Mask = "##"
- MaxLength = 2
- PromptChar = "_"
- TabIndex = 8
- Top = 1800
- Width = 372
- End
- Begin CommandButton Command2
- Caption = "Reset"
- Height = 372
- Left = 1800
- TabIndex = 5
- Top = 3240
- Width = 852
- End
- Begin CommandButton Command1
- Caption = "Redraw"
- Height = 372
- Left = 360
- TabIndex = 4
- Top = 3240
- Width = 852
- End
- Begin ComboBox Combo2
- Height = 288
- Left = 240
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 1200
- Width = 2532
- End
- Begin ComboBox Combo1
- Height = 288
- Left = 240
- Style = 2 'Dropdown List
- TabIndex = 0
- Top = 480
- Width = 2532
- End
- Begin Label Label4
- Caption = "Number of Sets"
- Height = 252
- Left = 480
- TabIndex = 7
- Top = 2400
- Width = 1332
- End
- Begin Label Label3
- Caption = "Number of Points"
- Height = 252
- Left = 360
- TabIndex = 6
- Top = 1800
- Width = 1452
- End
- Begin Label Label2
- Caption = "Graph Style:"
- Height = 252
- Left = 240
- TabIndex = 3
- Top = 960
- Width = 2532
- End
- Begin Label Label1
- Caption = "Graph Type:"
- Height = 252
- Left = 240
- TabIndex = 1
- Top = 240
- Width = 2172
- End
- Sub Combo1_Click ()
- redrawflag = 1 ' Prevent change in style from drawing twice
- Form1.Graph1.GraphType = Combo1.ListIndex + 1
- ResetGraphStyle (Form2.Combo1.ListIndex + 1)
- GraphType = Combo1.ListIndex + 1
- Form1.Graph1.DrawMode = 2
- redrawflag = 0
- End Sub
- Sub Combo2_Click ()
- GraphStyle = Combo2.ListIndex
- If GraphStyle = -1 Then
- GraphStyle = 0
- End If
- Form1.Graph1.GraphStyle = GraphStyle
- If redrawflag = 0 Then
- Form1.Graph1.DrawMode = 2
- End If
- End Sub
- Sub Command1_Click ()
- redrawflag = 1
- GraphType = Combo1.ListIndex + 1
- Form1.Graph1.GraphType = GraphType
- GraphStyle = Combo2.ListIndex
- If GraphStyle = -1 Then
- GraphStyle = 0
- End If
- Form1.Graph1.GraphStyle = GraphStyle
- PointsnSets
- Form1.Graph1.DrawMode = 2
- redrawflag = 0
- End Sub
- Sub Command2_Click ()
- 'Set first graph values
- GraphType = 2 ' 2D Bar
- GraphStyle = 0 ' Default
- ' Initialize the graph style
- redrawflag = 1
- Form2.Combo2.ListIndex = 0
- Form2.MaskedEdit1.Text = "05"
- Form2.MaskedEdit2.Text = "01"
- ' Points and Sets
- Form1.Graph1.NumPoints = 5
- Form1.Graph1.NumSets = 1
- ' Initialize the graph type
- If Form2.Combo1.ListIndex <> 2 Then
- Form2.Combo1.ListIndex = 2
- Else
- Form1.Graph1.DrawMode = 2
- End If
- End Sub
- Sub Command3_Click ()
- ' Reset graphtype combo to current style
- Combo1.ListIndex = GraphType - 1
- ' Reset graph style options
- ResetGraphStyle (GraphType)
- If GraphStyle = 0 Then
- Else
- Combo2.ListIndex = GraphStyle
- End If
- MaskedEdit1.Text = Format$(Form1.Graph1.NumPoints)
- MaskedEdit1.Text = Format$(Form1.Graph1.NumSets)
-
- End Sub
- Sub MaskedEdit1_ValidationError (InvalidText As String, StartPosition As Integer)
- PointsnSets
- End Sub
- Sub MaskedEdit2_ValidationError (InvalidText As String, StartPosition As Integer)
- PointsnSets
- End Sub
-