If Blue <= 255 Then Blue = Blue + 50 Else Blue = 0 Green = Green + 50 End If If Green >= 255 Then
Green = 0
Red = Red + 50
End If
If Red >= 255 Then
Red = 0
End If
Label1.ForeColor = Int(RGB(Red, Green, Blue))
Label1.Refresh
End Sub
Private Sub Timer1_Timer()
If Bola.Top >= Me.ScaleHeight - Bola.Height Or TakeOff = True Then
If Bola.Left >= Me.ScaleWidth - Bola.Width Or Cruising = True Then
If Bola.Left <= 0 - Bola.Width Then Call Awal: Exit Sub
Cruising = True
Bola.Left = Bola.Left - 50
Else
TakeOff = True
Bola.Left = Bola.Left + 50
Bola.Top = Bola.Top - 40
End If
Else
Bola.Left = Bola.Left + 70
Bola.Top = Bola.Top + 40
End If
A = A + 50
Me.Caption = "Kecepatan gerak Bola [ " & A & " m.s ]"
End Sub
0 komentar:
Posting Komentar