Results 1 to 4 of 4

Thread: Page not loading e.cancel = true

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2012
    Posts
    48

    Page not loading e.cancel = true

    Why would this not work? I get the new window to open yet it does not load. When I right click to veiw source it is empty.
    It will load without this in IE.
    The Address looks normal

    http://v.XXX.com/XXX/nVia7OaEHd7UYlv4.html

    Code:
    Private Sub WebBrowser2_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles WebBrowser2.NewWindow
    
            Dim myElement As HtmlElement = WebBrowser1.Document.ActiveElement
            Dim target As String = myElement.GetAttribute("href")
    
            Dim newInstance As New Form5
            newInstance.Show()
            newInstance.WebBrowser1.Navigate(target)
            'cancel opening IE window
            e.Cancel = True
        End Sub
    Thank You
    Last edited by Norseman; Mar 22nd, 2012 at 02:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width