Hello & Thanks ;
Having prob with this statement :
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Error code:
GetElementByTag\Form1.vb(7,156): error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Thanks for your Help...
Having prob with this statement :
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Error code:
GetElementByTag\Form1.vb(7,156): error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
VB.NET:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Navigate(TextBox1.Text)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("img")
For Each CurElement As HtmlElement In PageElements
TextBox2.Text = TextBox2.Text & CurElement.GetAttribute("src") & Environment.NewLine
Next
End Sub
End Class
Thanks for your Help...