delphi 获取网络上的图片,该怎么处理
delphi 获取网络上的图片
比如说直接获取http://www.fjwater.gov.cn/fangxun_fj/index.jsp这个页面上的数据,然后显示到delphi上去, 这要怎么做啊?要用什么控件 啊,,我只知道用idhttp呢!
------解决方案--------------------
pic是图片的id
比如说直接获取http://www.fjwater.gov.cn/fangxun_fj/index.jsp这个页面上的数据,然后显示到delphi上去, 这要怎么做啊?要用什么控件 啊,,我只知道用idhttp呢!
------解决方案--------------------
pic是图片的id
- Delphi(Pascal) code
var i:Integer; rang:IHTMLControlRange; s:string; begin try s := (IHTMLDocument2(wb.Document).images.item('pic',EmptyParam) as IHTMLElement).getAttribute('src',0); //showmessage(s); 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;
------解决方案--------------------
分析页面,得到里面的img的src,再取此src到流或临时文件,再显示此内容
------解决方案--------------------
那你用时钟去控制啊