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 dbgrid查询内容的导出为txt函数

Delphi 将memo转化为jpg输出

Delphi stringgrid行列的增加和删除

Delphi android下拉刷新

Delphi 对image字段存取图片、文件

Delphi shellexecute最简单的结束进程代码

Delphi issameday、istoday - 判断是不是同一天、判断是不是今天

Delphi 替换系统文件实现绕过杀软启动

windows 编程 窗体生成的过程

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



打赏

取消

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

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

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

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

评论

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