اخي انا في برنامجي استخدمت هذا الكود
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyUp Then
Label1.Caption = "forword"
Out &H378, 1
End If
If KeyCode = vbKeyDown Then
Label1.Caption = "backword"
Out &H378, 2
End If
If KeyCode = vbKeyLeft Then
Label1.Caption = "left"
Out &H378, 8
End If
If KeyCode = vbKeyRight Then
Label1.Caption = "right"
Out &H378, 4
End If
If KeyCode = vbKeyHome Then
Label1.Caption = "upleft"
Out &H378, 9
End If
If KeyCode = vbKeyPageUp Then
Label1.Caption = "upright"
Out &H378, 5
End If
If KeyCode = vbKeyEnd Then
Label1.Caption = "downleft"
Out &H378, 10
End If
If KeyCode = vbKeyPageDown Then
Label1.Caption = "downright"
Out &H378, 6
End If
If KeyCode = vbKeySpace Then
Label1.Caption = "stop"
Out &H378, 0
End If
End Sub
انا اخي استخدمت ازرار الحاسبة على لوحة المفاتيح كما ترى وهي الطريقة الامثل