key presses in visual basic?

does anyone know how to do a key presses in visual basic? i want to be able to hit for example the up arrow key and have an image move up. ive made command buttons to move an image up, down, left, and right with the top and left properties.
Something like this, I'd wager:
1
2
3
4
5
6
Public Class Form1

    Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
        MsgBox("Keypress detected")
    End Sub
End Class


More Information:
http://msdn.microsoft.com/en-us/library/ms171538.aspx
Topic archived. No new replies allowed.