delphi 获取网络上的图片 比如说直接获取http://www.fjwater.gov.cn/fangxun_fj/index.jsp这个页面上的数据,然后显示到delphi上去, 这要怎么做啊?要用什么控件 啊,,我只知道用idhttp呢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 pic是图片的idvar 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到流或临时文件,再显示此内容 额,我是这样写的,可是读出来的东西很奇怪,就只有一小段东西,给你们看看程序啊 , str := IdHTTP1.Get('http://www.fjwater.gov.cn/fangxun_fj/yuntu_photo/2011090214.00I'); Memo1.Lines.Add(str); AssignFile(mytext,'e:/teat.jpg'); Rewrite(mytext); Writeln(mytext,str); 这样我能读取到图片,可是这页面上的图片是会变化的,http://hi.csdn.net/space-2078587-do-album-picid-907744.html这个链接是图片,这样显示,,, 第一次提问:怎样取矢量图XY坐标? fastreport图片的打印 请朋友们帮忙做一下我们职称考试的一道题 要将一dbf文件导入ACCESS数据库,用纯ADO怎么实现 有关面试? 怎样提取表中的字段? 为什么Extended的精度于Double一样? 关于摄像头图像采集的一些问题求援助! 多久可以上手 如何将一记录文件还原成一棵树?此问题看似简单,但却让我伤神。 急求好心的高手 开发一个简单的FTP程序
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;
str := IdHTTP1.Get('http://www.fjwater.gov.cn/fangxun_fj/yuntu_photo/2011090214.00I');
Memo1.Lines.Add(str);
AssignFile(mytext,'e:/teat.jpg');
Rewrite(mytext);
Writeln(mytext,str); 这样我能读取到图片,可是这页面上的图片是会变化的,http://hi.csdn.net/space-2078587-do-album-picid-907744.html这个链接是图片,这样显示,,,