在delphi 中使用WebBrowser浏览网页,如何屏蔽掉鼠标右键菜单谢谢

解决方案 »

  1.   

    Application.OnMessage:=ApplicationMessage;procedure ApplicationMessage(var Msg: TMsg; var Handled: Boolean);
    begin
      if IsChild(WebBrowser.Handle, Msg.Hwnd) and ((Msg.Message = WM_RBUTTONDOWN) or (Msg.Message = WM_RBUTTONUP)) then
      begin
        Handled:=True;
      end;
    end;也可使用ApplcaitonEvents控件(ApplicationEvents.OnMessage)!