delphi中如何控制WebBrowser滚动条


本文整理自网络,侵删。

 uses mshtml;

var htmldoc: IHTMLDocument2;
MaxScrollWidth, MaxScrollHeight: Integer;

htmldoc := web.Document as IHTMLDocument2;
MaxScrollHeight := htmldoc.body.getAttribute('ScrollHeight', 0); //获得滚动条最大高度
MaxScrollWidth := htmldoc.body.getAttribute('ScrollWidth', 0);//获得滚动条最大宽度
Web.OleObject.Document.ParentWindow.ScrollBy(MaxScrollWidth, MaxScrollHeight ); //滚动到最右最下
//www.delphitop.com 搜集整理

相关阅读 >>

Delphi 苹果系统弹出链接

Delphi 数组定义

Delphi获取flash文件的影片时长,原始尺寸,帧数等信息

Delphi 如何在richedit控件里加入链接

Delphi窗口显示和关闭的时候出现动画效果

Delphi tsearchrec

Delphi gdi+ 文本输出

Delphi ado通用操作数据单元

Delphi中使用内联变量(inline variables) 的5个理由

Delphi gb2312 编码转义url字符串

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...