Private Sub WebBrowser1_DocumentCompleted_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
For Each Image As HtmlElement In WebBrowser1.Document.Images
If Image.GetAttribute("src").Contains("captcha") Then
Dim Web As New Net.WebClient
PictureBox1.Image = New Drawing.Bitmap(New IO.MemoryStream(Web.DownloadData(Image.GetAttribute("src"))))
End If
Next
End Sub
End Class
我試圖找到一種方法將此轉換爲webclient。由於我有這個代碼,目前正在使用網絡瀏覽器。我怎樣才能將其轉換爲webclient?
您已經發布了一個'WebBrowser'的事件處理程序 - 不知道還有什麼與控制完成的,它是不可能告訴。 – Oded 2012-01-08 14:16:00