0

this is code which opens new window link in same programe

Private Sub WebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow
        ' This will be triggered only when link tries to open in new window. 
        ' That means active element in web document will always be a Link.

        Dim myElement As HtmlElement = WebBrowser1.Document.ActiveElement
        Dim target As String = myElement.GetAttribute("href")

        Dim newInstance As New Form1
        newInstance.Show()
        newInstance.WebBrowser1.Navigate(target)

        cancel opening IE window
        e.Cancel = True
    End Sub
2
Contributors
1
Reply
5
Views
5 Years
Discussion Span
Last Post by pocohontus
0

what exactly is the error??

shortcut to start a web page
process.start(link in double quote)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.