2013-09-01
展开全部
//去除边框,滚动条
procedure WB_Set3DBorderStyle(Sender: TObject; bValue: Boolean);
var
Document : IHTMLDocument2;
Element : IHTMLElement;
StrBorderStyle: string;
begintry
Document := TWebBrowser(Sender).Document as IHTMLDocument2;
TWebBrowser(Sender).OleObject.Document.Body.Scroll := 'no';//去除滚动条
if Assigned(Document) then
begin
Element := Document.Body;
if Element <> nil then
begin
case BValue of
False: StrBorderStyle := 'none';
True: StrBorderStyle := '';
end;
Element.Style.BorderStyle := StrBorderStyle;
end;
end;
except
end;
end;在窗体的DocumentComplete事件中调用你可以参考我的百度博客上的文章介绍~http://hi.baidu.com/ray108/blog/item/7305e14f2c125a03b3de05cc.html
procedure WB_Set3DBorderStyle(Sender: TObject; bValue: Boolean);
var
Document : IHTMLDocument2;
Element : IHTMLElement;
StrBorderStyle: string;
begintry
Document := TWebBrowser(Sender).Document as IHTMLDocument2;
TWebBrowser(Sender).OleObject.Document.Body.Scroll := 'no';//去除滚动条
if Assigned(Document) then
begin
Element := Document.Body;
if Element <> nil then
begin
case BValue of
False: StrBorderStyle := 'none';
True: StrBorderStyle := '';
end;
Element.Style.BorderStyle := StrBorderStyle;
end;
end;
except
end;
end;在窗体的DocumentComplete事件中调用你可以参考我的百度博客上的文章介绍~http://hi.baidu.com/ray108/blog/item/7305e14f2c125a03b3de05cc.html
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询