M
mikey
I have the following code:
Private Sub FMain_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Select Case e.KeyCode
Case Keys.W
Controller.UserTank.Undraw()
Controller.UserTank.MoveUp()
Controller.UserTank.Draw()
Case Keys.S
Controller.UserTank.Undraw()
Controller.UserTank.MoveDown()
Controller.UserTank.Draw()
Case Keys.Space
Controller.UserTank.FireProjectile()
tmrProjectiles.Start()
End Select
End Sub
Obviously, when moving up (or down) and then firing stops you moving.
How do I stop this, I want to be able to move and shoot without
having to repress the key.
Thanks.
Private Sub FMain_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
Select Case e.KeyCode
Case Keys.W
Controller.UserTank.Undraw()
Controller.UserTank.MoveUp()
Controller.UserTank.Draw()
Case Keys.S
Controller.UserTank.Undraw()
Controller.UserTank.MoveDown()
Controller.UserTank.Draw()
Case Keys.Space
Controller.UserTank.FireProjectile()
tmrProjectiles.Start()
End Select
End Sub
Obviously, when moving up (or down) and then firing stops you moving.
How do I stop this, I want to be able to move and shoot without
having to repress the key.
Thanks.