1,105,395 Community Members

Open new window in web browser (vb.net)

Member Avatar
Newbie Poster
17 posts since Jun 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 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

        cancel opening IE window
        e.Cancel = True
    End Sub
Question Self-Answered as of 2 Years Ago
Member Avatar
Newbie Poster
9 posts since Nov 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]

what exactly is the error??

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

This question has already been solved: Start a new discussion instead
Start New Discussion
Tags Related to this Article