我用webbrowser作个简易浏览器,如何禁止此浏览器得右键功能

解决方案 »

  1.   

    在ShowContextMenu里result := S_OK;搞定
      

  2.   

    procedure   TForm1.ApplicationEvents1Message(var   Msg:   tagMSG;   
          var   Handled:   Boolean);   
      var   
          mPoint   :   TPoint;   
      begin   
          if   IsChild(WebBrowser.Handle,   Msg.Hwnd)   and   
                ((Msg.Message   =   WM_RBUTTONDOWN)   or   (Msg.Message   =   WM_RBUTTONUP)     then   
          begin   
              GetCursorPos(mPoint);   
              PopupMenu1.Popup(mPoint.X,   mPoint.Y);   
              Handled:=True;   
          end;   
      end;   主要是截获消息,然后自己处理,具体实现可以到下面的链接看看
    http://www.blogcn.com/user65/mestars/blog/44832290.html