Public Class Form1 Dim duck1Path As String = _ "C:\Documents and Settings\James\My Documents\Visual Studio 2005\Projects\DuckTimers\duck1.jpg" Dim duck2Path As String = _ "C:\Documents and Settings\James\My Documents\Visual Studio 2005\Projects\DuckTimers\duck2.jpg" Dim duck1 As Image = Image.FromFile(duck1Path) Dim duck2 As Image = Image.FromFile(duck2Path) Dim x As Integer = 0 Dim y As Integer = 0 Dim a As Integer = 381 Dim b As Integer = 340 Sub MoveRight() picDuck.Location = New Point(x, y) x = x + 5 End Sub Sub MoveLeft() picDuck.Location = New Point(x, y) x = x - 5 End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If (x <= 700) Then MoveRight() Else picDuck.Image = duck2 Timer1.Stop() Timer2.Start() End If End Sub Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick If (x >= 0) Then MoveLeft() Else picDuck.Image = duck1 Timer2.Stop() Timer1.Start() End If End Sub Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click picDuck.Image = duck1 Timer1.Start() End Sub Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click Timer1.Stop() Timer2.Stop() MsgBox(picDuck.Location.X) MsgBox(picBullet.Location.Y) End Sub Sub Shoot() picBullet.Location = New Point(a, b) b = b - 8 End Sub Private Sub Timer3_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer3.Tick Shoot() End Sub Private Sub btnFire_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFire.Click Timer3.Start() b = 340 picBullet.Location = New Point(a, b) End Sub End Class