kourosh
Nov 15th, 1999, 07:19 AM
hi, I want to generate form1.backcolor every 1 second so I have used the timer but I can't get this code to work can anybody help.
=============================================
Private Sub Timer1_Timer()
Randomize
Dim Blue As Integer
Dim Red As Integer
Dim Green As Integer
Blue = Int((1 - 85 + 1) * Rnd + 1)
Red = Int((1 - 85 + 1) * Rnd + 1)
Green = Int((1 - 85 + 1) * Rnd + 1)
Form1.BackColor = RGB(Red, Green, Blue)
End Sub
=============================================
Thanks alot.
:) :)
=============================================
Private Sub Timer1_Timer()
Randomize
Dim Blue As Integer
Dim Red As Integer
Dim Green As Integer
Blue = Int((1 - 85 + 1) * Rnd + 1)
Red = Int((1 - 85 + 1) * Rnd + 1)
Green = Int((1 - 85 + 1) * Rnd + 1)
Form1.BackColor = RGB(Red, Green, Blue)
End Sub
=============================================
Thanks alot.
:) :)