请问,怎么样去除webbrowser的滚动条?还有,怎么样去掉他的边框,使他成平铺状态,

taodawn 2003-10-09 04:25:33
请问,怎么样去除webbrowser的滚动条?还有,怎么样去掉他的边框,使他成平铺状态,
像一些控件有bordersytle属性,可webbrowser没有,该怎么办啊?
...全文
191 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
ronanlin 2004-01-03
  • 打赏
  • 举报
回复
<body scroll=no>
devercai 2003-10-16
  • 打赏
  • 举报
回复
去掉边框

uses
MSHTML;

procedure WB_Set3DBorderStyle(Sender: TObject; bValue: Boolean);
var
Document : IHTMLDocument2;
Element : IHTMLElement;
StrBorderStyle: string;
begin
Document := TWebBrowser(Sender).Document as IHTMLDocument2;
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;
end;

procedure TForm1.WebBrowser1NavigateComplete2(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
begin
WB_Set3DBorderStyle(Sender, False);
end;
devercai 2003-10-16
  • 打赏
  • 举报
回复
去滚动条代码
WebBrowser1.OleObject.Document.Body.Style.OverflowX := 'hidden';
WebBrowser1.OleObject.Document.Body.Style.OverflowY := 'hidden';
bphoenix 2003-10-16
  • 打赏
  • 举报
回复
写HTML网页也有可以把滚动条去掉的语句,建议你改写网页就可以了
cobberxp 2003-10-16
  • 打赏
  • 举报
回复
修改好的:
http://www.cobber.org/vcl/embedwb116bd7.rar
taodawn 2003-10-14
  • 打赏
  • 举报
回复
如何 修改??请高手帮忙啊
cobberxp 2003-10-14
  • 打赏
  • 举报
回复
在delphi7下编译,是要修改一下的
taodawn 2003-10-11
  • 打赏
  • 举报
回复
为什么下载后,按装时,编译出错啊,
在Result := Unassigned;时提示没有定义unassigned没有定义
cobberxp 2003-10-10
  • 打赏
  • 举报
回复
方法一:
用控件 embedwb,可以直接设置
下载地址:http://www.euromind.com/iedelphi/download/embedwb116b.zip
方法二:
procedure TForm1.WBDocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
var
Doc : IHTMLDocument2;
Element : IHTMLElement;
begin
Doc := IHTMLDocument2(TWebBrowser(Sender).Document);
if Doc = nil then
Exit;
Element := Doc.body;
if Element = nil then
Exit;
case Make_Flat of
TRUE : Element.style.borderStyle := 'none';
FALSE : Element.style.borderStyle := '';
end;
end;
taodawn 2003-10-09
  • 打赏
  • 举报
回复
UP一下

5,379

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧