Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Static x As Integer = 5 Static y As Integer = 0 Static Flip As Integer = False If y Mod 2 = 0 Then Me.PictureBox1.Image = My.Resources.ferrari_icon Else Me.PictureBox1.Image = My.Resources.ferrari_icon End If If Me.PictureBox1.Left >= 500 Then x = -5 Flip = True ElseIf Me.PictureBox1.Left >= 0 Then x = 5 Flip = False End If If Flip = True Then Me.PictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX) End If Me.PictureBox1.Left = Me.PictureBox1.Left + x y += 1 End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)