Monday, December 6, 2010

Chapter 15- Loops- For-Next Statements

'Chapter 15 Assignment- programs #5, 6,7,8 (Pick 3)

' The following is Kind-of from the reading
For intCountDown As Integer = 10 To 1 Step -1
lblCountToBlastOff.Text = intCountDown
Me.Refresh()
System.Threading.Thread.Sleep(200)
Next intCountDown
My.Computer.Audio.Play("H:\Programming2010\Spaceship Solution-Version 1\ZZ.wav")
lblCountToBlastOff.Text = "Blast Off!"
Me.Refresh()
System.Threading.Thread.Sleep(500)
' hide the label control
lblCountToBlastOff.Visible = False
' drag the spaceship to the top of the form
Do While picSpaceship.Top > 0
picSpaceship.Top = picSpaceship.Top - 10
Me.Refresh()
System.Threading.Thread.Sleep(200)
Loop

No comments:

Post a Comment