| 发表于:2007-06-03 11:09:4917楼 得分:100 |
'窗体上添加2个commandbutton,1个image,1个webbrowser private sub command1_click() webbrowser1.navigate2 "http://post.baidu.com/f?kz=207893930 " end sub private sub command2_click() 'commandbutton按两次,image控件讲显示验证码图片 dim ctrlrange, x, k as boolean for each x in webbrowser1.document.all if x.tagname = "textarea " and k = false then if x.name = "co " then x.focus k = true end if end if if x.tagname = "img " and k then if instr(1, x.src, "post.baidu.com/cgi-bin/genimg ") > 0 then set ctrlrange = webbrowser1.document.body.createcontrolrange() ctrlrange.add (x) ctrlrange.EXECcommand ( "copy ") image1.picture = clipboard.getdata end if end if next end sub | | |
|