Visual Basic'te Renklerin Dansı
Kullanılacak:
1 Adet Label , 1 adet Timer
Private Sub Form_Load()
Timer1.Interval = 10
AutoRedraw = True
Label1.AutoSize = True
End Sub
Private Sub Timer1_Timer()
Dim x, y
Static i
i = (i + 1) Mod 360
y = ScaleHeight / 2 + ScaleHeight / 2 * Sin(i * 3.1415 / 180)
x = ScaleWidth / 2 + ScaleWidth / 2 * Cos(i * 3.1415 / 180)
Label1.Top = y
Label1.Left = x
Line (ScaleWidth / 2, ScaleHeight / 2)-(x, y), i * 10
Label1 = i
End Sub
Kolay gelsin. İnşallah beğenmişsinizdir.
|