Subclass WM_RBUTTONUPCase WM_RBUTTONUP 'Eat the event so that the default context 'menu is not displayed. If bDisableContextMenu Then RaiseEvent MouseUp(vbRightButton, nShift, x, y) If m_bMouseDown Then m_bMouseDown = False RaiseEvent Click(vbRightButton) End If ‘bHandled = True '吃掉此消息,即不不出现右键菜单 lReturn=CallWindowProc(prevProc, hWnd, wMsg, wParam, lParam) '吃掉此消息,即不不出现右键菜单 Exit Sub End If
'Eat the event so that the default context
'menu is not displayed.
If bDisableContextMenu Then
RaiseEvent MouseUp(vbRightButton, nShift, x, y)
If m_bMouseDown Then
m_bMouseDown = False
RaiseEvent Click(vbRightButton)
End If
‘bHandled = True '吃掉此消息,即不不出现右键菜单
lReturn=CallWindowProc(prevProc, hWnd, wMsg, wParam, lParam) '吃掉此消息,即不不出现右键菜单
Exit Sub
End If