title: Form not reading arrow key in keydown event
body: <p>im programming a form that moves a picturebox left or right a certain distance based on arrow key presses. I am aware that the form needs KeyPreveiw = True, and is set accordingly. my code is:</p>
  
  <pre><code>Public Sub frmGame_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
      If e.KeyCode = Keys.A OrElse e.KeyCode = Keys.Left Then
          leftorright = -1
      End If
      If e.KeyCode = Keys.D OrElse e.KeyCode = Keys.Right Then
          leftorright = 1
      End If
      If e.KeyCode = Keys.W OrElse e.KeyCode = Keys.Up Then
          upordown = -1
      End If
      If e.KeyCode = Keys.S OrElse e.KeyCode = Keys.Down Then
          upordown = 1
      End If
  End Sub
  </code></pre>
  
  <p>In this block, WASD works accordingly, however LRUD arrows do not trigger at all. I tried using:</p>
  
  <pre><code>Msgbox(e.keycode.tostring())
  </code></pre>
  
  <p>to show if they were firing off, other buttons worked (123, ABC, etc), the arrows however did not. My guess on the problem is that i have buttons on the form, and they are taking the keypresses for themselves (priority over the form). On my form i have 3 buttons, when i press lets say the down arrow, i can see each button be highlighted going through the three. How can i fix this problem? Thank you in advance!</p>
  
  <p>EDIT: After removing the button, the code works. I need to figure out how to make the form take priority over the button if possible :)</p>