Imports System Imports System.Drawing Public Class Form1 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.Resource1.Bird_l Else Me.PictureBox1.Image = My.Resources.Resource1.bird_r 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 End Class
Me.PictureBox1.Image = My.Resources.Resource1.bird_r
My.Resources.Resource1.Bird_l
My.Resources.Resource1.Bird_r
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)