Tuesday, October 22, 2013

Car goes forward and Hits a Wall

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
     picCar1.Left = picCar1.Left + 10

If picCar1.Top < rightBorder.Top + rightBorder.Height And picCar1.Top > rightBorder.Top - picCar1.Height And picCar1.Left < rightBorder.Left + rightBorder.Width And picCar1.Left > rightBorder.Left - picCar1.Width Then
     
Timer1.Enabled = False

 
End If

End Sub

No comments:

Post a Comment