代码如下:生成的exe在ie7下面,窗体当中可以正常的显示验证码,但到ie6下面却没反应,不显示?为什么啊?
Private Sub Command1_Click()
    Dim IE
    Set IE = CreateObject("Internetexplorer.application")
    IE.Visible = True
    IE.Navigate "http://login.sina.com.cn/signup/signup.php?entry=blog"
    While IE.Busy Or IE.ReadyState <> 4
    Wend
    IE.Document.getElementById("door").focus
    Picture1.AutoSize = True
    Dim CtrlRange As Object
    Set CtrlRange = IE.Document.body.createControlRange
    CtrlRange.Add IE.Document.getElementById("check_img")
    CtrlRange.execCommand ("Copy")
    Picture1.Picture = Clipboard.GetData()
    Set IE = Nothing
End Sub

解决方案 »

  1.   

    Private Sub Command1_Click()
        Dim IE
        Set IE = CreateObject("Internetexplorer.application")
        IE.Visible = True
        IE.Navigate "http://login.sina.com.cn/signup/signup.php?entry=blog"
        While IE.Busy Or IE.ReadyState <> 4
        Wend
        IE.Document.getElementById("door").focus
        Picture1.AutoSize = True
        Dim CtrlRange As Object
        Set CtrlRange = IE.Document.body.createControlRange
        CtrlRange.Add IE.Document.getElementById("check_img")
        While IE.Busy Or IE.ReadyState <> 4
        Wend
        CtrlRange.execCommand ("Copy")
        Picture1.Picture = Clipboard.GetData()
        Set IE = Nothing
    End Sub