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 获取超gb大文件大小

Delphi 移动windows开始按钮到任务栏中的任何位置

Delphi xe5 for android 调用java类库必看的文件

Delphi开启和关闭windows xp 防火墙

Delphi listbox防止添加重复

Delphi 检查父进程

Delphi 获取ie中选项卡标题

Delphi读写firebird二进制数据

Delphi httpserver 使用方法

Delphi superobject 序列数据集

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



打赏

取消

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

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

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

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

评论

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