home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch06 / spiral / spirals.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-20  |  13.8 KB  |  462 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Spiral"
  4.    ClientHeight    =   6645
  5.    ClientLeft      =   2100
  6.    ClientTop       =   945
  7.    ClientWidth     =   7440
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   6645
  11.    ScaleWidth      =   7440
  12.    Begin VB.Frame Frame1 
  13.       Caption         =   "Pen Width"
  14.       BeginProperty Font 
  15.          Name            =   "Times New Roman"
  16.          Size            =   9.75
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   1140
  24.       Left            =   5625
  25.       TabIndex        =   28
  26.       Top             =   5295
  27.       Width           =   1635
  28.       Begin VB.OptionButton WOption 
  29.          Height          =   195
  30.          Index           =   1
  31.          Left            =   150
  32.          Style           =   1  'Graphical
  33.          TabIndex        =   31
  34.          Top             =   300
  35.          Value           =   -1  'True
  36.          Width           =   210
  37.       End
  38.       Begin VB.OptionButton WOption 
  39.          Height          =   195
  40.          Index           =   2
  41.          Left            =   150
  42.          Style           =   1  'Graphical
  43.          TabIndex        =   30
  44.          Top             =   570
  45.          Width           =   210
  46.       End
  47.       Begin VB.OptionButton WOption 
  48.          Height          =   195
  49.          Index           =   3
  50.          Left            =   150
  51.          Style           =   1  'Graphical
  52.          TabIndex        =   29
  53.          Top             =   840
  54.          Width           =   225
  55.       End
  56.       Begin VB.Line Line1 
  57.          X1              =   540
  58.          X2              =   1455
  59.          Y1              =   390
  60.          Y2              =   390
  61.       End
  62.       Begin VB.Line Line2 
  63.          BorderWidth     =   2
  64.          X1              =   1455
  65.          X2              =   540
  66.          Y1              =   660
  67.          Y2              =   675
  68.       End
  69.       Begin VB.Line Line3 
  70.          BorderWidth     =   3
  71.          X1              =   1425
  72.          X2              =   540
  73.          Y1              =   930
  74.          Y2              =   930
  75.       End
  76.    End
  77.    Begin VB.PictureBox CPicture 
  78.       BackColor       =   &H000000FF&
  79.       Height          =   225
  80.       Index           =   0
  81.       Left            =   6000
  82.       ScaleHeight     =   165
  83.       ScaleWidth      =   1080
  84.       TabIndex        =   27
  85.       Top             =   1590
  86.       Width           =   1140
  87.    End
  88.    Begin VB.OptionButton Option 
  89.       Height          =   255
  90.       Index           =   0
  91.       Left            =   5745
  92.       Style           =   1  'Graphical
  93.       TabIndex        =   26
  94.       Top             =   1575
  95.       Width           =   225
  96.    End
  97.    Begin VB.PictureBox CPicture 
  98.       BackColor       =   &H000000C0&
  99.       Height          =   225
  100.       Index           =   1
  101.       Left            =   6000
  102.       ScaleHeight     =   165
  103.       ScaleWidth      =   1080
  104.       TabIndex        =   25
  105.       Top             =   1995
  106.       Width           =   1140
  107.    End
  108.    Begin VB.OptionButton Option 
  109.       Height          =   255
  110.       Index           =   1
  111.       Left            =   5745
  112.       Style           =   1  'Graphical
  113.       TabIndex        =   24
  114.       Top             =   1935
  115.       Width           =   225
  116.    End
  117.    Begin VB.PictureBox CPicture 
  118.       BackColor       =   &H0000FFFF&
  119.       Height          =   225
  120.       Index           =   2
  121.       Left            =   6000
  122.       ScaleHeight     =   165
  123.       ScaleWidth      =   1080
  124.       TabIndex        =   23
  125.       Top             =   2385
  126.       Width           =   1140
  127.    End
  128.    Begin VB.OptionButton Option 
  129.       Height          =   255
  130.       Index           =   2
  131.       Left            =   5745
  132.       Style           =   1  'Graphical
  133.       TabIndex        =   22
  134.       Top             =   2370
  135.       Width           =   225
  136.    End
  137.    Begin VB.PictureBox CPicture 
  138.       BackColor       =   &H0000FF00&
  139.       Height          =   225
  140.       Index           =   3
  141.       Left            =   6000
  142.       ScaleHeight     =   165
  143.       ScaleWidth      =   1080
  144.       TabIndex        =   21
  145.       Top             =   2790
  146.       Width           =   1140
  147.    End
  148.    Begin VB.OptionButton Option 
  149.       Height          =   255
  150.       Index           =   3
  151.       Left            =   5745
  152.       Style           =   1  'Graphical
  153.       TabIndex        =   20
  154.       Top             =   2775
  155.       Width           =   225
  156.    End
  157.    Begin VB.PictureBox CPicture 
  158.       BackColor       =   &H00FFFF00&
  159.       Height          =   225
  160.       Index           =   4
  161.       Left            =   6000
  162.       ScaleHeight     =   165
  163.       ScaleWidth      =   1080
  164.       TabIndex        =   19
  165.       Top             =   3180
  166.       Width           =   1140
  167.    End
  168.    Begin VB.OptionButton Option 
  169.       Height          =   255
  170.       Index           =   4
  171.       Left            =   5745
  172.       Style           =   1  'Graphical
  173.       TabIndex        =   18
  174.       Top             =   3165
  175.       Width           =   225
  176.    End
  177.    Begin VB.PictureBox CPicture 
  178.       BackColor       =   &H00FF0000&
  179.       Height          =   225
  180.       Index           =   5
  181.       Left            =   6000
  182.       ScaleHeight     =   165
  183.       ScaleWidth      =   1080
  184.       TabIndex        =   17
  185.       Top             =   3585
  186.       Width           =   1140
  187.    End
  188.    Begin VB.OptionButton Option 
  189.       Height          =   255
  190.       Index           =   5
  191.       Left            =   5745
  192.       Style           =   1  'Graphical
  193.       TabIndex        =   16
  194.       Top             =   3570
  195.       Width           =   225
  196.    End
  197.    Begin VB.PictureBox CPicture 
  198.       BackColor       =   &H00FF00FF&
  199.       Height          =   225
  200.       Index           =   6
  201.       Left            =   6015
  202.       ScaleHeight     =   165
  203.       ScaleWidth      =   1080
  204.       TabIndex        =   15
  205.       Top             =   3990
  206.       Width           =   1140
  207.    End
  208.    Begin VB.OptionButton Option 
  209.       Height          =   255
  210.       Index           =   6
  211.       Left            =   5745
  212.       Style           =   1  'Graphical
  213.       TabIndex        =   14
  214.       Top             =   3975
  215.       Width           =   225
  216.    End
  217.    Begin VB.PictureBox CPicture 
  218.       BackColor       =   &H00000000&
  219.       Height          =   225
  220.       Index           =   7
  221.       Left            =   6030
  222.       ScaleHeight     =   165
  223.       ScaleWidth      =   1080
  224.       TabIndex        =   13
  225.       Top             =   4380
  226.       Width           =   1140
  227.    End
  228.    Begin VB.OptionButton Option 
  229.       Height          =   255
  230.       Index           =   7
  231.       Left            =   5745
  232.       Style           =   1  'Graphical
  233.       TabIndex        =   12
  234.       Top             =   4365
  235.       Value           =   -1  'True
  236.       Width           =   225
  237.    End
  238.    Begin VB.PictureBox CPicture 
  239.       BackColor       =   &H00FFFFFF&
  240.       Height          =   225
  241.       Index           =   8
  242.       Left            =   6015
  243.       ScaleHeight     =   165
  244.       ScaleWidth      =   1080
  245.       TabIndex        =   11
  246.       Top             =   4785
  247.       Width           =   1140
  248.    End
  249.    Begin VB.OptionButton Option 
  250.       Height          =   255
  251.       Index           =   8
  252.       Left            =   5745
  253.       Style           =   1  'Graphical
  254.       TabIndex        =   10
  255.       Top             =   4770
  256.       Width           =   225
  257.    End
  258.    Begin VB.HScrollBar HScroll4 
  259.       Height          =   210
  260.       LargeChange     =   10
  261.       Left            =   2070
  262.       Max             =   40
  263.       TabIndex        =   9
  264.       Top             =   6255
  265.       Width           =   3345
  266.    End
  267.    Begin VB.CommandButton Command2 
  268.       Caption         =   "Clear Graph"
  269.       BeginProperty Font 
  270.          Name            =   "Times New Roman"
  271.          Size            =   12
  272.          Charset         =   0
  273.          Weight          =   400
  274.          Underline       =   0   'False
  275.          Italic          =   0   'False
  276.          Strikethrough   =   0   'False
  277.       EndProperty
  278.       Height          =   405
  279.       Left            =   5655
  280.       TabIndex        =   7
  281.       Top             =   675
  282.       Width           =   1575
  283.    End
  284.    Begin VB.HScrollBar HScroll3 
  285.       Height          =   240
  286.       Left            =   255
  287.       Max             =   20
  288.       Min             =   10
  289.       MousePointer    =   1  'Arrow
  290.       TabIndex        =   4
  291.       Top             =   8760
  292.       Value           =   20
  293.       Width           =   6210
  294.    End
  295.    Begin VB.HScrollBar HScroll2 
  296.       Height          =   210
  297.       LargeChange     =   10
  298.       Left            =   2070
  299.       Max             =   150
  300.       MousePointer    =   1  'Arrow
  301.       SmallChange     =   10
  302.       TabIndex        =   3
  303.       Top             =   5955
  304.       Value           =   100
  305.       Width           =   3345
  306.    End
  307.    Begin VB.HScrollBar HScroll1 
  308.       Height          =   210
  309.       LargeChange     =   10
  310.       Left            =   2070
  311.       Max             =   150
  312.       Min             =   50
  313.       SmallChange     =   10
  314.       TabIndex        =   2
  315.       Top             =   5625
  316.       Value           =   110
  317.       Width           =   3345
  318.    End
  319.    Begin VB.CommandButton Command1 
  320.       Caption         =   "Start"
  321.       BeginProperty Font 
  322.          Name            =   "Times New Roman"
  323.          Size            =   12
  324.          Charset         =   0
  325.          Weight          =   400
  326.          Underline       =   0   'False
  327.          Italic          =   0   'False
  328.          Strikethrough   =   0   'False
  329.       EndProperty
  330.       Height          =   405
  331.       Left            =   5655
  332.       TabIndex        =   1
  333.       Top             =   120
  334.       Width           =   1575
  335.    End
  336.    Begin VB.PictureBox Picture1 
  337.       BackColor       =   &H00808080&
  338.       FillStyle       =   0  'Solid
  339.       ForeColor       =   &H000000FF&
  340.       Height          =   5310
  341.       Left            =   100
  342.       ScaleHeight     =   350
  343.       ScaleMode       =   3  'Pixel
  344.       ScaleWidth      =   350
  345.       TabIndex        =   0
  346.       Top             =   135
  347.       Width           =   5310
  348.    End
  349.    Begin VB.Frame Frame2 
  350.       Caption         =   "Pen Color"
  351.       BeginProperty Font 
  352.          Name            =   "Times New Roman"
  353.          Size            =   9.75
  354.          Charset         =   0
  355.          Weight          =   400
  356.          Underline       =   0   'False
  357.          Italic          =   0   'False
  358.          Strikethrough   =   0   'False
  359.       EndProperty
  360.       Height          =   3960
  361.       Left            =   5610
  362.       TabIndex        =   32
  363.       Top             =   1200
  364.       Width           =   1620
  365.    End
  366.    Begin VB.Label Label3 
  367.       Caption         =   "Inner Offset"
  368.       BeginProperty Font 
  369.          Name            =   "Times New Roman"
  370.          Size            =   9.75
  371.          Charset         =   0
  372.          Weight          =   400
  373.          Underline       =   0   'False
  374.          Italic          =   0   'False
  375.          Strikethrough   =   0   'False
  376.       EndProperty
  377.       Height          =   225
  378.       Left            =   195
  379.       TabIndex        =   8
  380.       Top             =   6255
  381.       Width           =   1755
  382.    End
  383.    Begin VB.Label Label2 
  384.       Caption         =   "Inner Radius"
  385.       BeginProperty Font 
  386.          Name            =   "Times New Roman"
  387.          Size            =   9.75
  388.          Charset         =   0
  389.          Weight          =   400
  390.          Underline       =   0   'False
  391.          Italic          =   0   'False
  392.          Strikethrough   =   0   'False
  393.       EndProperty
  394.       Height          =   270
  395.       Left            =   195
  396.       TabIndex        =   6
  397.       Top             =   5925
  398.       Width           =   1785
  399.    End
  400.    Begin VB.Label Label1 
  401.       Caption         =   "Outer Radius"
  402.       BeginProperty Font 
  403.          Name            =   "Times New Roman"
  404.          Size            =   9.75
  405.          Charset         =   0
  406.          Weight          =   400
  407.          Underline       =   0   'False
  408.          Italic          =   0   'False
  409.          Strikethrough   =   0   'False
  410.       EndProperty
  411.       Height          =   270
  412.       Left            =   195
  413.       TabIndex        =   5
  414.       Top             =   5595
  415.       Width           =   1785
  416.    End
  417. Attribute VB_Name = "Form1"
  418. Attribute VB_GlobalNameSpace = False
  419. Attribute VB_Creatable = False
  420. Attribute VB_PredeclaredId = True
  421. Attribute VB_Exposed = False
  422. Private Sub Command1_Click()
  423. If Command1.Caption = "Stop" Then
  424.     BreakNow = True
  425.     Exit Sub
  426.     BreakNow = False
  427.     Command1.Caption = "Stop"
  428. End If
  429. DrawRoullette
  430. End Sub
  431. Private Sub Command2_Click()
  432.     Form1.Picture1.Cls
  433. End Sub
  434. Private Sub Form_Load()
  435.     PenColor = RGB(0, 0, 0)
  436.     HScroll1_Change
  437.     HScroll2_Change
  438.     HScroll4_Change
  439. End Sub
  440. Private Sub HScroll1_Change()
  441.     Label1.Caption = "Outer Radius  " & HScroll1.Value
  442. End Sub
  443. Private Sub HScroll1_Scroll()
  444.     Label1.Caption = "Outer Radius  " & HScroll1.Value
  445. End Sub
  446. Private Sub HScroll2_Change()
  447.     Label2.Caption = "Inner Radius   " & HScroll2.Value - 80
  448.         
  449. End Sub
  450. Private Sub HScroll2_Scroll()
  451.     Label2.Caption = "Inner Radius   " & HScroll2.Value - 80
  452. End Sub
  453. Private Sub HScroll4_Change()
  454.     Label3.Caption = "Inner Offset     " & HScroll4.Value
  455. End Sub
  456. Private Sub Option_Click(Index As Integer)
  457.     PenColor = CPicture(Index).BackColor
  458. End Sub
  459. Private Sub WOption_Click(Index As Integer)
  460.     Picture1.DrawWidth = Index
  461. End Sub
  462.