好像要用到MapVirtualKey,不知道该怎么用,求教。

解决方案 »

  1.   

    '在调用HOOK函数时得到的,代码如下:
    Function HookProc(ByVal code As Long, ByVal wParam As Long, _
                    ByVal lParam As Long) As Long
    Dim i As Long, j As Integer
    If code <> HC_ACTION Then
       HookProc = CallNextHookEx(hHook, code, wParam, lParam)
       Exit Function
    End If
    CopyMemory msg, lParam, LenB(msg)
      If msg.message = WM_KEYUP Then
         i = msg.paramL  'msg.paramL为键盘扫描码
         Debug.Print i
      End If
    HookProc = CallNextHookEx(hHook, code, wParam, lParam)
    End Functionmsdn上应该有说明。