我是这样做的
t:=TmemoryStream.Create;
s:='';
idhttp1.Get('验证码地址',t);
application.ProcessMessages;
s:=GetTmpFileName(true,'~~','.bmp');
t.SaveToFile(s);
image.Picture.Bitmap.LoadFromFile(s)
可为什么我下载的验证码跟用
WebBrowser1
显示的网页里的验证码不一样??谢谢各位大虾!!!!!
t:=TmemoryStream.Create;
s:='';
idhttp1.Get('验证码地址',t);
application.ProcessMessages;
s:=GetTmpFileName(true,'~~','.bmp');
t.SaveToFile(s);
image.Picture.Bitmap.LoadFromFile(s)
可为什么我下载的验证码跟用
WebBrowser1
显示的网页里的验证码不一样??谢谢各位大虾!!!!!
解决方案 »
- delphi 如何实现运行时窗体设计?
- TreeView的Expanding和MouseDown问题
- 关于动态设置Midas应用程序服务器连接数据库的问题,请高手指点。
- 如何设置Tchart控件来显示数据值?
- 高手!
- ★★★XPBarMenu的问题★★★
- quickreport根据报表的内容自动加序号的问题
- 请问,我想将treeview开成以下结构该怎样做?
- 已取到表的所有字段名,如何在程序中判断那些字段是关键字字段?
- 我的问题怎么没人回答呢?不是很难吧.
- WebBrowser复制图片到剪贴板问题?急,,急,,,在线等!!!
- WebBrowser复制图片到剪贴板问题?急,,急,,,在线等!!!
var
d2,D:IHTMLDocument2;
d1:IHTMLDocument;
e:IHTMLElement;
e2:IHTMLElement2;
cp:IHTMLControlRange;
img,img1:IHTMLImgElement;
ce:IHTMLControlElement;
myitem:Olevariant;
i:integer;
begin D:= webbrowser1.Document as IHTMLDocument2;
e:=d.body as IHTMLElement;
e2:=e as IHTMLElement2;
cp:=e2.createControlRange as IHTMLControlRange;
d2:= webbrowser1.Document as IHTMLDocument2;
myitem := WebBrowser1.Document;
for i := 0 to D.images.length - 1 do
begin
img1:=D.all.item(i,varempty) as IHTMLImgElement;
if img1.src='images/buttom_01_01.jpg' then
img:=img1 AS IHTMLImgElement;
begin
end;
end;
// Clipboard.Assign(img as IHTMLImgElement);
// img:=d2.images.item('images/buttom_01_01.jpg',0) AS IHTMLImgElement;
ce:=img as IHTMLControlElement;
cp.add(ce);
cp.execCommand('Copy',false,0);
end;初始化如下
initialization
OleInitialize(nil);
finalization
OleUninitialize;//end.前面。
在uses中加入ActiveX
============================================不过运行时提示interface not supported ...不知道什么原因,,,急