I am a beginner and I want to move a shape according to which arrow button I press. But I don't want to press it a lot of times, just once and that's it.

What I mean is , for example, if I press on the right arrow, the shape will move right by itself until it hits the extremity of the form.

Thanks in advance

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 39 Then
Shape1.Left = Shape1.Left + 50
End If

If KeyCode = 38 Then
Shape1.Top = Shape1.Top - 50
End If

If KeyCode = 37 Then
Shape1.Left = Shape1.Left - 50
End If

If KeyCode = 40 Then
Shape1.Top = Shape1.Top + 50
End If
End Sub
The code shows what I did but it doesn't work like I want it to be.