home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer's Journal Buyer's Guide / Visual_Basic_Programmers_Journal_Buyers_Guide_CD-ROM_1994.iso / pinnacle / cbdemo / cbdemo2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1993-11-10  |  5.0 KB  |  175 lines

  1. VERSION 2.00
  2. Begin Form Form2 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "CBDemo Options"
  5.    Height          =   4380
  6.    Left            =   7068
  7.    LinkTopic       =   "Form2"
  8.    MaxButton       =   0   'False
  9.    ScaleHeight     =   3960
  10.    ScaleWidth      =   3132
  11.    Top             =   1116
  12.    Width           =   3228
  13.    Begin CommandButton Command3 
  14.       Caption         =   "Cancel"
  15.       Height          =   372
  16.       Left            =   3360
  17.       TabIndex        =   10
  18.       Top             =   2280
  19.       Visible         =   0   'False
  20.       Width           =   732
  21.    End
  22.    Begin MaskEdBox MaskedEdit2 
  23.       Height          =   288
  24.       Left            =   1920
  25.       Mask            =   "##"
  26.       MaxLength       =   2
  27.       PromptChar      =   "_"
  28.       TabIndex        =   9
  29.       Top             =   2400
  30.       Width           =   372
  31.    End
  32.    Begin MaskEdBox MaskedEdit1 
  33.       Height          =   288
  34.       Left            =   1920
  35.       Mask            =   "##"
  36.       MaxLength       =   2
  37.       PromptChar      =   "_"
  38.       TabIndex        =   8
  39.       Top             =   1800
  40.       Width           =   372
  41.    End
  42.    Begin CommandButton Command2 
  43.       Caption         =   "Reset"
  44.       Height          =   372
  45.       Left            =   1800
  46.       TabIndex        =   5
  47.       Top             =   3240
  48.       Width           =   852
  49.    End
  50.    Begin CommandButton Command1 
  51.       Caption         =   "Redraw"
  52.       Height          =   372
  53.       Left            =   360
  54.       TabIndex        =   4
  55.       Top             =   3240
  56.       Width           =   852
  57.    End
  58.    Begin ComboBox Combo2 
  59.       Height          =   288
  60.       Left            =   240
  61.       Style           =   2  'Dropdown List
  62.       TabIndex        =   2
  63.       Top             =   1200
  64.       Width           =   2532
  65.    End
  66.    Begin ComboBox Combo1 
  67.       Height          =   288
  68.       Left            =   240
  69.       Style           =   2  'Dropdown List
  70.       TabIndex        =   0
  71.       Top             =   480
  72.       Width           =   2532
  73.    End
  74.    Begin Label Label4 
  75.       Caption         =   "Number of Sets"
  76.       Height          =   252
  77.       Left            =   480
  78.       TabIndex        =   7
  79.       Top             =   2400
  80.       Width           =   1332
  81.    End
  82.    Begin Label Label3 
  83.       Caption         =   "Number of Points"
  84.       Height          =   252
  85.       Left            =   360
  86.       TabIndex        =   6
  87.       Top             =   1800
  88.       Width           =   1452
  89.    End
  90.    Begin Label Label2 
  91.       Caption         =   "Graph Style:"
  92.       Height          =   252
  93.       Left            =   240
  94.       TabIndex        =   3
  95.       Top             =   960
  96.       Width           =   2532
  97.    End
  98.    Begin Label Label1 
  99.       Caption         =   "Graph Type:"
  100.       Height          =   252
  101.       Left            =   240
  102.       TabIndex        =   1
  103.       Top             =   240
  104.       Width           =   2172
  105.    End
  106. Sub Combo1_Click ()
  107.     redrawflag = 1 ' Prevent change in style from drawing twice
  108.     Form1.Graph1.GraphType = Combo1.ListIndex + 1
  109.     ResetGraphStyle (Form2.Combo1.ListIndex + 1)
  110.     GraphType = Combo1.ListIndex + 1
  111.     Form1.Graph1.DrawMode = 2
  112.     redrawflag = 0
  113. End Sub
  114. Sub Combo2_Click ()
  115.     GraphStyle = Combo2.ListIndex
  116.     If GraphStyle = -1 Then
  117.         GraphStyle = 0
  118.     End If
  119.     Form1.Graph1.GraphStyle = GraphStyle
  120.     If redrawflag = 0 Then
  121.        Form1.Graph1.DrawMode = 2
  122.     End If
  123. End Sub
  124. Sub Command1_Click ()
  125.     redrawflag = 1
  126.     GraphType = Combo1.ListIndex + 1
  127.     Form1.Graph1.GraphType = GraphType
  128.     GraphStyle = Combo2.ListIndex
  129.     If GraphStyle = -1 Then
  130.         GraphStyle = 0
  131.     End If
  132.     Form1.Graph1.GraphStyle = GraphStyle
  133.     PointsnSets
  134.     Form1.Graph1.DrawMode = 2
  135.     redrawflag = 0
  136. End Sub
  137. Sub Command2_Click ()
  138.     'Set first graph values
  139.     GraphType = 2   ' 2D Bar
  140.     GraphStyle = 0  ' Default
  141.     ' Initialize the graph style
  142.     redrawflag = 1
  143.     Form2.Combo2.ListIndex = 0
  144.     Form2.MaskedEdit1.Text = "05"
  145.     Form2.MaskedEdit2.Text = "01"
  146.     ' Points and Sets
  147.     Form1.Graph1.NumPoints = 5
  148.     Form1.Graph1.NumSets = 1
  149.     ' Initialize the graph type
  150.     If Form2.Combo1.ListIndex <> 2 Then
  151.        Form2.Combo1.ListIndex = 2
  152.     Else
  153.        Form1.Graph1.DrawMode = 2
  154.     End If
  155. End Sub
  156. Sub Command3_Click ()
  157.     ' Reset graphtype combo to current style
  158.     Combo1.ListIndex = GraphType - 1
  159.     ' Reset graph style options
  160.     ResetGraphStyle (GraphType)
  161.     If GraphStyle = 0 Then
  162.     Else
  163.         Combo2.ListIndex = GraphStyle
  164.     End If
  165.     MaskedEdit1.Text = Format$(Form1.Graph1.NumPoints)
  166.     MaskedEdit1.Text = Format$(Form1.Graph1.NumSets)
  167.             
  168. End Sub
  169. Sub MaskedEdit1_ValidationError (InvalidText As String, StartPosition As Integer)
  170.     PointsnSets
  171. End Sub
  172. Sub MaskedEdit2_ValidationError (InvalidText As String, StartPosition As Integer)
  173.     PointsnSets
  174. End Sub
  175.