回覆列表
  • 1 # 使用者1465424935672

    DeclareFunctionSetWindowLongLib"User32"Alias"SetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong,ByValdwNewLongAsLong)AsLong

    DeclareFunctionGetWindowLongLib"User32"Alias"GetWindowLongA"(ByValhwndAsLong,ByValnIndexAsLong)AsLong

    DeclareFunctionCallWindowProcLib"User32"Alias"CallWindowProcA"(ByVallpPrevWndFuncAsLong,ByValhwndAsLong,ByValMsgAsLong,ByValwParamAsLong,ByVallParamAsLong)AsLong

    DeclareFunctionRegisterHotKeyLib"User32"(ByValhwndAsLong,ByValidAsLong,ByValfsModifiersAsLong,ByValvkAsLong)AsLong

    DeclareFunctionUnregisterHotKeyLib"User32"(ByValhwndAsLong,ByValidAsLong)AsLong

    PublicFunctionWndproc(ByValhwndAsLong,ByValMsgAsLong,ByValwParamAsLong,ByVallParamAsLong)AsLong

    "記錄原來的window程式地址

    preWinProc=GetWindowLong(Me.hwnd,GWL_WNDPROC)

    "用自定義程式代替原來的window程式

    ret=SetWindowLong(Me.hwnd,GWL_WNDPROC,AddressOfWndproc)

    RegisterHotKey(Me.hwnd,1,0,vbKeyF9)

    ret=SetWindowLong(Me.hwnd,GWL_WNDPROC,preWinProc)

    CallUnregisterHotKey(Me.hwnd,vbKeyF9)

  • 中秋節和大豐收的關聯?
  • 怎樣為Ubuntu系統設定軟體源?