📄 disablerbutton.bas
字号:
Attribute VB_Name = "DisableRButton"
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const GWL_WNDPROC = (-4)
Private Const WM_RBUTTONDOWN = &H204
Private m_lpPrevDisableRButtonDownWindowProc As Long
Function DisableRButtonDownWindowProc(ByVal hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If uMsg = WM_RBUTTONDOWN Then
Exit Function
End If
DisableRButtonDownWindowProc = CallWindowProc(m_lpPrevDisableRButtonDownWindowProc, hwnd, uMsg, wParam, lParam)
End Function
Public Function HookText(ByVal hwnd As Long) As Boolean
m_lpPrevDisableRButtonDownWindowProc = SetWindowLong(hwnd, GWL_WNDPROC, AddressOf DisableRButtonDownWindowProc)
End Function
Public Function UnHookText(ByVal hwnd As Long) As Boolean
Call SetWindowLong(hwnd, GWL_WNDPROC, m_lpPrevDisableRButtonDownWindowProc)
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -