delphi如何隐藏webBrowser的滚动条,如何屏蔽右键

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
begin    //水平垂直均可隐藏 
  WebBrowser1.oleobject.Document.body.Scroll := 'no';
  WebBrowser1.oleobject.Document.documentElement.style.overflow := 'hidden';
end;

procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG;
  var Handled: Boolean);
begin
  //要加一个ApplicationEvents
  with Msg do
  begin
    if not IsChild(WebBrowser1.Handle,hwnd) then Exit;
    Handled := (message = WM_RBUTTONDOWN) or (message = WM_RBUTTONUP) or (message = WM_CONTEXTMENU);
  end;  
end;


 

你可能感兴趣的:(url,Delphi,WebBrowser)