delphi 获取Webbrowser中的图片


本文整理自网络,侵删。

 
procedure TfrmMain.DomImg2Image(wb:TWebBrowser);var  i:Integer;  rang:IHTMLControlRange;  s:string;begin  try  s := (IHTMLDocument2(wb.Document).images.item('pic',EmptyParam) as IHTMLElement).getAttribute('src',0);      rang:=((IHTMLDocument2(wb.Document).body as HTMLBody).createControlRange)as        IHTMLControlRange;      rang.add(IHTMLDocument2(wb.Document).images.item('pic',EmptyParam)as        IHTMLControlElement);      rang.execCommand('Copy',False,0);      image1.Picture.Assign(ClipBoard);  except  end;end;

相关阅读 >>

Delphi 字符串、文件路径 排序算法

Delphi xe5 android 使用system.zip单元释放资源文件

Delphi xe 安卓web开发 错误:net::err_cleartext_not_permitted

Delphi 获取鼠标与键盘空闲时间

Delphi使程序的窗口出现在最前面并激活

Delphi tchart使用经验小结

Delphi 读取流 image1 stream 加载到image2 timage 对象

Delphi中引用sqlite3

Delphi 多关键词批量替换

Delphi 枚举resource资源名

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



打赏

取消

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

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

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

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

评论

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