wandoprog
Nov 4th, 2000, 11:51 PM
I have been writing this code and i can't seem to get it to work. The form contains a line and a timer. I can't get it out of the constant loop. If anyone can help it would be greatly appreciated.
The Code is like this:
General declarations
Option Explicit
Dim x1
Dim x2
Dim y1
Dim y2
Dim R
Dim G
Dim B
Dim intcount As Integer
Public Sub Intervals()
Dim make
Dim go
make = Timer
Do Until go >= make + 0.14
go = Timer
Loop
End Sub
Private Sub Command1_Click()
timer1.Enabled = True
End Sub
Private Sub Command2_Click()
timer1.Enabled = False
End Sub
Private Sub timer1_Timer()
R = Int(240 * Rnd)
G = Int(240 * Rnd)
B = Int(240 * Rnd)
Do Until timer1.Enabled = False
Randomize
Line1.BorderColor = Int(RGB(R, G, B * Rnd))
Line1.x1 = Int(Form1.Width * Rnd) + 1
Line1.y1 = Int(Form1.Height * Rnd) + 1
Line1.x2 = Int(Form1.Width * Rnd) + 1
Line1.y2 = Int(Form1.Height * Rnd) + 1
Intervals
Cls
Loop
timer1.Enabled = False
End Sub
Thank you!!!
The Code is like this:
General declarations
Option Explicit
Dim x1
Dim x2
Dim y1
Dim y2
Dim R
Dim G
Dim B
Dim intcount As Integer
Public Sub Intervals()
Dim make
Dim go
make = Timer
Do Until go >= make + 0.14
go = Timer
Loop
End Sub
Private Sub Command1_Click()
timer1.Enabled = True
End Sub
Private Sub Command2_Click()
timer1.Enabled = False
End Sub
Private Sub timer1_Timer()
R = Int(240 * Rnd)
G = Int(240 * Rnd)
B = Int(240 * Rnd)
Do Until timer1.Enabled = False
Randomize
Line1.BorderColor = Int(RGB(R, G, B * Rnd))
Line1.x1 = Int(Form1.Width * Rnd) + 1
Line1.y1 = Int(Form1.Height * Rnd) + 1
Line1.x2 = Int(Form1.Width * Rnd) + 1
Line1.y2 = Int(Form1.Height * Rnd) + 1
Intervals
Cls
Loop
timer1.Enabled = False
End Sub
Thank you!!!