如果以下代码无法实现,可以通过增加WebBrowser尺寸,然后将边沿用不显示的方法来实现。
uses MSHTML; procedure TEVEMusic.WebBrowser1DocumentComplete(ASender: TObject; const pDisp: IDispatch; var URL: OleVariant); var Document:IHTMLDocument2; Element:IHTMLElement; StrBorderStyle:string; begin try Document:=WebBrowser1.Document as IHTMLDocument2; if Assigned(Document) then begin Element:=Document.Body; if Element <> nil then begin StrBorderStyle:='none'; Element.Style.BorderStyle:=StrBorderStyle; end; end; except end; end;