Option Explicit
Dim i As Integer
Private Sub form_keydown(keycode As Integer,shift As Integer)
If keycode = 37 Then 如果按下键值为37的键
Shape1.Left = Shape1.Left - 100 图形控件想左移动
ElseIf keycode = 38 Then
Shape1.Top = Shape1.Top - 100 同理
ElseIf keycode = 39 Then
Shape1.Left = Shape1.Left + 100
ElseIf keycode = 40 Then
Shape1.Top = Shape1.Top + 100
End If
End Sub