webbrowser控件和form窗体无缝结合示例

procedure TForm2.WebBrowser1DocumentComplete(ASender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
begin
  { 文档加载完毕 }
  IHtmlDocument2(WebBrowser1.Document).body.style.overflow := 'hidden';
  IHtmlDocument2(WebBrowser1.Document).body.style.borderstyle := 'none';
  IHtmlDocument2(WebBrowser1.Document).body.style.background :=
    ColorToWebColorStr(Form2.Color);
end;

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