I know that my english can be better. Please rate my work and not my lack in linguistic skills!

If you find any kind of ownership issue, or you think some content is your property. Please be so kind and contact me, i will remove or solve it ASAP.

You like my free Uploads and want to support me, than please donate here:

Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean 'handle your keys here End Function

    Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
        If keyData = Keys.A Then
            Console.WriteLine("left")
            Me.SuspendLayout()
            If Not (Me.PictureBox1.Location.X) < 0 Then
                Dim pt As Point = New Point(Me.PictureBox1.Location.X - 5, Me.PictureBox1.Location.Y)
                Me.PictureBox1.Location = pt
            End If
            Me.ResumeLayout()
            Return True
        End If
        If keyData = Keys.D Then
            If Not (Me.PictureBox1.Location.X + Me.PictureBox1.Width) > Me.Width Then
                Dim pt As Point = New Point(Me.PictureBox1.Location.X + 5, Me.PictureBox1.Location.Y)
                Me.PictureBox1.Location = pt
            End If
        End If
        If keyData = Keys.S Then
            If Not (Me.PictureBox1.Location.Y) < 0 Then
                Dim pt As Point = New Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y + 5)
                Me.PictureBox1.Location = pt
            End If
        End If
        If keyData = Keys.W Then
            If Not (Me.PictureBox1.Location.Y) < 0 Then
                Dim pt As Point = New Point(Me.PictureBox1.Location.X, Me.PictureBox1.Location.Y - 5)
                Me.PictureBox1.Location = pt
            End If
        End If
        Return MyBase.ProcessCmdKey(msg, keyData)
    End Function