0

I've been searching a bit and I haven't been able to exactly find what I need. I need to contain a popup window within the WebBrowser control in VB.NET

I found this project: http://www.codeproject.com/KB/cpp/ExtendedWebBrowser.aspx

But I've been having trouble parsing out what I need from it. It looks like it implements what I need, but I'm not really sure how the heck it's doing it. I just need to capture a popup and display it in a new WebBrowser object.

2

1 Answer 1

1
Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
    Dim myelement As HtmlElement = WebBrowser1.Document.ActiveElement
    Dim target As String = myelement.GetAttribute("href")
    Dim newinstance As New WebBrowser
    newinstance.Show()
    newinstance.Navigate(target)
    e.Cancel = True
End Sub
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.