1. Buatlah Form, 1 label dan 1 timer
2. Atur Interval pada timer (500)
3. Double klik gambar timer dan masukkan kode berikut :
Dim Red, Green, Blue As Integer
Private Sub Timer1_Timer()
If Blue <= 255 Then Blue = Blue + 50 Else Blue = 0 = Green + 50 >= 255
Green = 0
Red = Red + 50
If Red >= 255 Then
Red = 0
End If
Label1.ForeColor = Int(RGB(Red, Green, Blue))
Label1.Refresh
End Sub
4. Selesai. Preview (F5)
Semoga Bermanfaat.
0 komentar:
Post a Comment