delphi
文章平均质量分 62
confiself
这个作者很懒,什么都没留下…
展开
-
delphi 获取元素相对屏幕的位置
由于需要点击验证码刷新,所以需要获取其相对屏幕的位置,代码如下:vardoc:IHTMLDocument3;ele2:IHTMLElement2;p:TPoint;begin doc:=WebBrowser1.Document as IHTMLDocument3; ele2:=doc.getElementById('captchaImg') as IHTMLElement2;这原创 2015-04-26 12:08:40 · 1462 阅读 · 0 评论 -
delphi webbrowser与idhhtp两种方式下载验证码
procedure TForm1.GetCaptcha(wb:TWebBrowser);var doc:IHTMLDocument3; ele:IHTMLElement; rang:IHTMLControlRange; s:string; Bitmap:TBitmap;begin try //获取src为s,其中captchaImg为图片ID原创 2015-04-26 11:59:31 · 1284 阅读 · 0 评论 -
汉字GB2312转Unicode
function GB2UniCode(GB:string):string; vars,stmp: string;i, j, k: integer;a: array [1..160] of char;begins:='';StringToWideChar(GB, @(a[1]), 500);i:=1;while ((a[i]#0)) do beginj:=Integer(a[i原创 2015-09-22 22:54:26 · 382 阅读 · 0 评论