home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.UserDocument AXSpiral
- ClientHeight = 6645
- ClientLeft = 2100
- ClientTop = 945
- ClientWidth = 7440
- HScrollSmallChange= 15
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 6645
- ScaleWidth = 7440
- VScrollSmallChange= 15
- Begin VB.Frame Frame1
- Caption = "Pen Width"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 1140
- Left = 5625
- TabIndex = 28
- Top = 5295
- Width = 1635
- Begin VB.OptionButton WOption
- Height = 195
- Index = 1
- Left = 150
- Style = 1 'Graphical
- TabIndex = 31
- Top = 300
- Value = -1 'True
- Width = 210
- End
- Begin VB.OptionButton WOption
- Height = 195
- Index = 2
- Left = 150
- Style = 1 'Graphical
- TabIndex = 30
- Top = 570
- Width = 210
- End
- Begin VB.OptionButton WOption
- Height = 195
- Index = 3
- Left = 150
- Style = 1 'Graphical
- TabIndex = 29
- Top = 840
- Width = 225
- End
- Begin VB.Line Line1
- X1 = 540
- X2 = 1455
- Y1 = 390
- Y2 = 390
- End
- Begin VB.Line Line2
- BorderWidth = 2
- X1 = 1455
- X2 = 540
- Y1 = 660
- Y2 = 675
- End
- Begin VB.Line Line3
- BorderWidth = 3
- X1 = 1425
- X2 = 540
- Y1 = 930
- Y2 = 930
- End
- End
- Begin VB.PictureBox CPicture
- BackColor = &H000000FF&
- Height = 225
- Index = 0
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 27
- Top = 1590
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 0
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 26
- Top = 1575
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H000000C0&
- Height = 225
- Index = 1
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 25
- Top = 1995
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 1
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 24
- Top = 1935
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H0000FFFF&
- Height = 225
- Index = 2
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 23
- Top = 2385
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 2
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 22
- Top = 2370
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H0000FF00&
- Height = 225
- Index = 3
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 21
- Top = 2790
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 3
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 20
- Top = 2775
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H00FFFF00&
- Height = 225
- Index = 4
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 19
- Top = 3180
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 4
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 18
- Top = 3165
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H00FF0000&
- Height = 225
- Index = 5
- Left = 6000
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 17
- Top = 3585
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 5
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 16
- Top = 3570
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H00FF00FF&
- Height = 225
- Index = 6
- Left = 6015
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 15
- Top = 3990
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 6
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 14
- Top = 3975
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H00000000&
- Height = 225
- Index = 7
- Left = 6030
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 13
- Top = 4380
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 7
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 12
- Top = 4365
- Value = -1 'True
- Width = 225
- End
- Begin VB.PictureBox CPicture
- BackColor = &H00FFFFFF&
- Height = 225
- Index = 8
- Left = 6015
- ScaleHeight = 165
- ScaleWidth = 1080
- TabIndex = 11
- Top = 4785
- Width = 1140
- End
- Begin VB.OptionButton Option
- Height = 255
- Index = 8
- Left = 5745
- Style = 1 'Graphical
- TabIndex = 10
- Top = 4770
- Width = 225
- End
- Begin VB.HScrollBar HScroll4
- Height = 210
- LargeChange = 10
- Left = 2070
- Max = 40
- TabIndex = 9
- Top = 6255
- Width = 3345
- End
- Begin VB.CommandButton Command2
- Caption = "Clear Graph"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 405
- Left = 5655
- TabIndex = 7
- Top = 675
- Width = 1575
- End
- Begin VB.HScrollBar HScroll3
- Height = 240
- Left = 255
- Max = 20
- Min = 10
- MousePointer = 1 'Arrow
- TabIndex = 4
- Top = 8760
- Value = 20
- Width = 6210
- End
- Begin VB.HScrollBar HScroll2
- Height = 210
- LargeChange = 10
- Left = 2070
- Max = 150
- MousePointer = 1 'Arrow
- SmallChange = 10
- TabIndex = 3
- Top = 5955
- Value = 100
- Width = 3345
- End
- Begin VB.HScrollBar HScroll1
- Height = 210
- LargeChange = 10
- Left = 2070
- Max = 150
- Min = 50
- SmallChange = 10
- TabIndex = 2
- Top = 5625
- Value = 110
- Width = 3345
- End
- Begin VB.CommandButton Command1
- Caption = "Start"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 12
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 405
- Left = 5655
- TabIndex = 1
- Top = 120
- Width = 1575
- End
- Begin VB.PictureBox Picture1
- BackColor = &H00808080&
- FillStyle = 0 'Solid
- ForeColor = &H000000FF&
- Height = 5310
- Left = 100
- ScaleHeight = 350
- ScaleMode = 3 'Pixel
- ScaleWidth = 350
- TabIndex = 0
- Top = 135
- Width = 5310
- End
- Begin VB.Frame Frame2
- Caption = "Pen Color"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 3960
- Left = 5610
- TabIndex = 32
- Top = 1200
- Width = 1620
- End
- Begin VB.Label Label3
- Caption = "Inner Offset"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 225
- Left = 195
- TabIndex = 8
- Top = 6255
- Width = 1755
- End
- Begin VB.Label Label2
- Caption = "Inner Radius"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 195
- TabIndex = 6
- Top = 5925
- Width = 1785
- End
- Begin VB.Label Label1
- Caption = "Outer Radius"
- BeginProperty Font
- Name = "Times New Roman"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 270
- Left = 195
- TabIndex = 5
- Top = 5595
- Width = 1785
- End
- Attribute VB_Name = "AXSpiral"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- Dim BreakNow As Integer
- Dim PenColor As Long
- Sub DrawRoullette()
- Dim R1, R2, r, pi
- R1 = HScroll1.Value
- R2 = HScroll2.Value - 80
- If R2 = o Then R2 = 10
- r = HScroll4.Value
- pi = 4 * Atn(1)
- Dim loop1, loop2
- Dim t, X, Y As Double
- Dim Rotations As Integer
- If Int(R1 / R2) = R1 / R2 Then
- Rotations = 1
- Rotations = Abs(R2 / 10)
- If Int(R2 / 10) <> R2 / 10 Then Rotations = 10 * Rotations
- End If
- For loop1 = 1 To Rotations
- If BreakNow Then
- Command1.Caption = "Start"
- BreakNow = False
- Exit Sub
- End If
- For loop2 = 0 To 2 * pi Step pi / (4 * 360)
- t = loop1 * 2 * pi + loop2
- X = (R1 + R2) * Cos(t) - (R2 + r) * Cos(((R1 + R2) / R2) * t)
- Y = (R1 + R2) * Sin(t) - (R2 + r) * Sin(((R1 + R2) / R2) * t)
- Picture1.PSet (Picture1.ScaleWidth / 2 + X, Picture1.ScaleHeight / 2 + Y), PenColor
- Next
- DoEvents
- Command1.Caption = "Start"
- BreakNow = False
- End Sub
- Private Sub UserDocument_Initialize()
- Call Form_Load
- End Sub
- Private Sub Command1_Click()
- If Command1.Caption = "Stop" Then
- BreakNow = True
- Exit Sub
- BreakNow = False
- Command1.Caption = "Stop"
- End If
- DrawRoullette
- End Sub
- Private Sub Command2_Click()
- UserDocument.Picture1.Cls
- End Sub
- Private Sub Form_Load()
- PenColor = RGB(0, 0, 0)
- HScroll1_Change
- HScroll2_Change
- HScroll4_Change
- End Sub
- Private Sub HScroll1_Change()
- Label1.Caption = "Outer Radius " & HScroll1.Value
- End Sub
- Private Sub HScroll1_Scroll()
- Label1.Caption = "Outer Radius " & HScroll1.Value
- End Sub
- Private Sub HScroll2_Change()
- Label2.Caption = "Inner Radius " & HScroll2.Value - 80
-
- End Sub
- Private Sub HScroll2_Scroll()
- Label2.Caption = "Inner Radius " & HScroll2.Value - 80
- End Sub
- Private Sub HScroll4_Change()
- Label3.Caption = "Inner Offset " & HScroll4.Value
- End Sub
- Private Sub Option_Click(Index As Integer)
- PenColor = CPicture(Index).BackColor
- End Sub
- Private Sub WOption_Click(Index As Integer)
- Picture1.DrawWidth = Index
- End Sub
-