Set the KeyPreview property of the Form to True and use code simular to the following in the KeyDown event of the form.Best regardsVB Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case vbKeyDown Shape1.Top = Shape1.Top + 45 '3 pixels Case vbKeyUp Shape1.Top = Shape1.Top - 45 '3 pixels Case vbKeyLeft Shape1.Left = Shape1.Left - 45 Case vbKeyRight Shape1.Left = Shape1.Left + 45 End Select End Sub




Reply With Quote