title: Key being held down in vb.net?
body: <p>I am writing a game for class, and what the player does is uses "wasd" to swim away from a chasing shark. My code for movement is</p>
  
  <pre><code>Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
      Select Case e.KeyCode
  
          Case Keys.W
              If picSwimmer.Location.Y &gt; -5 Then
                  Loc = New Point(picSwimmer.Location.X, picSwimmer.Location.Y - 15)
                  picSwimmer.Location = Loc
              End If
          Case Keys.S
              End If
              If picSwimmer.Location.Y &lt; Me.Height Then
                  Loc = New Point(picSwimmer.Location.X, picSwimmer.Location.Y + 15)
                  picSwimmer.Location = Loc
              End If
  </code></pre>
  
  <p>(I have the same setup for a&amp;d as well). My problem is that when you hold down one of the "wasd" keys, the image will move slightly then stop, then start moving fluidly after about a second. I think this is due to the amount of time it takes for VB to recognize that a key is being held down, rather than being clicked once. How would I make it so that VB will register that the key is being held down from the beginning, or shortens the time it takes to recognize the fact that it's being held down? Or anything that would make the movement smooth as soon as the key is pressed?</p>