Kayıt
17 Kasım 2007
Mesajlar
10.379
Beğeniler
2
Şehir
istanbul / bomonti
2 tane Shape,2 tane Line,1 tane Command button,2 tane Timer kullanılarak basit bir yarış.
Kod:
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
End Sub

Private Sub Timer1_Timer()
If Shape1.Left >= 3480 Then
Timer1.Enabled = False
Timer2.Enabled = True
Else
Shape1.Left = Shape1.Left + Int(Rnd * 100)
End If
End Sub

Private Sub Timer2_Timer()
If Shape2.Left >= 3480 Then
Timer1.Enabled = False
Timer2.Enabled = True
Else
Shape2.Left = Shape2.Left + Int(Rnd * 100)
End If
End Sub
 
Yukarı Alt