Private Sub Form_KeyPress(KeyAscii As Integer)
Dim DelayLaser As Long
'S/s to move ship right
If (KeyAscii = 83 Or KeyAscii = 115) And imgChar.Left < 8880 Then
imgChar.Left = imgChar.Left + 400
End If
'A/a moves ship left
If (KeyAscii = 65 Or KeyAscii = 97) And imgChar.Left > -150 Then
imgChar.Left = imgChar.Left - 400
'For the SpaceBar
If KeyAscii = 32 Then
If imgLaser1.Top > imgEnemy1.Top Then
While (imgLaser1.Top > imgEnemy1.Top)
For DelayLaser = 1 To 1000000000
imgLaser1.Top = imgLaser1.Top - 5
hold = DoEvents
Next DelayLaser
ElseIf imgLaser1.Top = 0 Then
imgLaser1.Top = imgChar.Top
imgLaser1.Left = imgChar.Left + 1120
imgLaser1.Top = imgChar.Top - 300
End If
Wend
End If
End Sub