Dim MCA As Integer, CEMin As Integer, CEMax As Integer, CAA As Integer, CAR As Boolean, NDDI As Integer, NRS As Integer, CGR(9) As Boolean, MPX As Single, MPY As Single, DirX As Integer, DirY As Integer, CCPX As Single, CCPY As Single
'Sorry for all of the abreviations, this will help:
'MCA = Max Circle Amount
'CEMin = Circle Expansion Minimum
'CEMax = Circle Expansion Maximum
'CAA = Circle Amount Activated
'CAR = Circle Activation Reverse
'NDDI = Next Dot Degree Interval
'NRS = Next Rotation Speed
'CGR = Circle Go Reverse
'MPX = Mouse Position X
'MPY = Mouse Position Y
'DirX = Direction X (0 = left, 1 = right)
'DirY = Direction Y (0 = down, 1 = up)
'CCPX = Circle Center Position X
'CCPY = Circle Center Position Y
Private Sub CACI_Timer() 'CACI = Circle Amount Change Interval
If CAR = False Then 'If the max amount of circles are here, don't add any more!
CAA = CAA + 1 'Add to circle amount
PrepareCM 'Get the new circle ready and loaded
If CAA = MCA Then CAR = True 'If the max circles has been reached, don't allow any more to form
End If
End Sub
Private Sub CRT_Timer() 'Circle Rotation Timer
Dim i As Integer
If CCPX + DA + CEMax > Screen.Width And DirX = 1 Then 'Don't let the circle go off the right side of the screen
DirX = 0 'Change the X direction (to left)
ElseIf CCPX - (DA + CEMax) < 0 And DirX = 0 Then 'Don't let the circle go off the left side of the screen
DirX = 1 'Change the X direction (to right)
End If
If CCPY + DA + CEMax > Screen.Height And DirY = 1 Then 'Don't let the circle go off the bottom of the screen
DirY = 0 'Change the X direction (to up)
ElseIf CCPY - (DA + CEMax) < 0 And DirY = 0 Then 'Don't let the circle go off the top of the screen
DirY = 1 'Change the X direction (to down)
End If
'Add to center offset (move)
'--------------------------------
If DirX = 1 Then CCPX = CCPX + DA
If DirX = 0 Then CCPX = CCPX - DA
If DirY = 1 Then CCPY = CCPY + DA
If DirY = 0 Then CCPY = CCPY - DA
'--------------------------------
For i = 0 To CAA - 1 'Loop through circles
If CM(i).Radius + CA > TP(i) And CGR(i) = False Then 'When the circle reaches the target radius, make it shrink back to 0
CM(i).Radius = TP(i)
CGR(i) = True
ElseIf CM(i).Radius - CA < 1 And CGR(i) = True Then 'When circle reaches 0 radius, select a new target radius and start expanding
CM(i).Radius = 1
CGR(i) = False
TP(i) = RndTP
ElseIf CGR(i) = False Then
CM(i).Radius = CM(i).Radius + CA 'Expand circle
ElseIf CGR(i) = True Then
CM(i).Radius = CM(i).Radius - CA 'Contract circle
End If
CM(i).Set_Center_Position CCPX, CCPY 'Set the new center position
CM(i).Draw_Circle i 'Draw the current circle
Next i 'Loop back
End Sub
Private Sub Form_Click()
Unload Me 'Unload form
End Sub
Private Sub Form_Load()
SetUpSystem 'Hide mouse
LoadRegValues 'Loads the options (saved in registry)
End Sub
Public Sub LoadRegValues() 'Loads all of the options in the registry, self explanitory