VB web browser - new window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • user232k2038
    New Member
    • Sep 2007
    • 16

    VB web browser - new window

    I've created a web browser application which makes use of the web browser control in VB 2005. However, whenever the user clicks a link which opens in a new window, Internet Explorer is used instead of my web browser application. When I checked the new window event of the web browser, there didn't seem to be any way to get the URL of the link or cancel the opening of Internet Explorer. Does anyone know how I can stop Internet Explorer from opening and use my browser instead?
  • shweta123
    Recognized Expert Contributor
    • Nov 2006
    • 692

    #2
    Hi,

    You have to either disable the popups in your web browser control OR
    disable the right click menu by which user can open a page in new window.

    Originally posted by aaaaaaaaaaaaaaa aaaaaaaaaa
    I've created a web browser application which makes use of the web browser control in VB 2005. However, whenever the user clicks a link which opens in a new window, Internet Explorer is used instead of my web browser application. When I checked the new window event of the web browser, there didn't seem to be any way to get the URL of the link or cancel the opening of Internet Explorer. Does anyone know how I can stop Internet Explorer from opening and use my browser instead?

    Comment

    • Computer Guru
      New Member
      • Mar 2008
      • 16

      #3
      Private Sub WebBrowser1_New Window(ByVal sender As Object, ByVal e As System.Componen tModel.CancelEv entArgs) Handles WebBrowser1.New Window

      e.Cancel = True

      End Sub

      This will cancel the event of opening the new window, however I am unsure how to get the URL of the window being opened.

      Comment

      • Monoz
        New Member
        • Jul 2011
        • 1

        #4
        try this...

        Private Sub webBrowser_NewW indow(ByVal sender As Object, ByVal e As System.Componen tModel.CancelEv entArgs) Handles webBrowser.NewW indow
        e.Cancel = True
        Dim newBrowser As frmBrowser = New frmBrowser
        newBrowser.Show ()
        End Sub

        Comment

        Working...