Hi guys. i'm new to this forum and new to programming in general. ive had some classes of vb.net and im just starting to actually play around with vb. im trying to make a program that starts with an image in a certain position (in ths case a car) and then, after 3 secs the image keeps moving at a certain speed untill i press a button button i cnt get it to work. can any of u guys help?
Public Class Form1 Dim B1C As Boolean = False Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles Car1.Click End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load carMovement(1) End Sub Public Sub carMovement(carNo As Integer) Dim initialCountdown As New Stopwatch initialCountdown.Start() Car1.Location = New Point(400, 350) If initialCountdown.ElapsedMilliseconds > 3000 Then If carNo = 1 Then For Value As Integer = 0 To 2 Dim carMoveSpeed As New Stopwatch carMoveSpeed.Restart() If carMoveSpeed.ElapsedMilliseconds > 500 Then Value = Value - 1 Car1.Location = New Point(400, Car1.Location.Y + 40) End If If B1C = True Then Exit For End If Next End If End If