i am making a game where you use the left and right arrow keys to move a little guy left and right on the screen and i have used this code:

VB Code:
  1. Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  2.  
  3. If KeyCode = vbKeyLeft Then
  4.  x = x - 100
  5.  
  6. Elseif keycode = vbkeyright then
  7.  x = x + 100
  8. end if
  9.  
  10. End Sub

that moves him left and right but the only thing is that when i hold down the key, he moves forwards for a fraction of a second, stops then starts moving normally until i let go. does anyone know how to just make it start moving normally as soon as i press the key?
also if i have any text boxes or buttons on my form then this code doesn't work, how do i get it to work while it has buttons and text boxes on it?