Results 1 to 4 of 4

Thread: WebBrowser in VB5 (SP3)

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Shropshire, England
    Posts
    14

    Question

    Some please help,

    I've managed to develop a web browser that uses the IE dll. It does everything i want except the following,

    If I let the user right click on a link on any web page then I want him to be able to go there. i.e. if he choses to "Open link in new browser", then I should let him do it, right.

    But in code, I can not tell if the user tried to open a new web page into a new browser. What happens is that, when the event gets processed, the graphic he clicked on opened in the new browser.

    I've probably done something really stupid, can someone please give me a hint.

    The purpose of this web browser is only allow a user to visit one website, (simple enough hey), and visit any links supplied to this web site.

    Have been to lots of places for sample code and shareware, but as yet have found no code to help me.

    [Edited by Mike Minton on 07-04-2000 at 09:26 AM]
    Were all drowning!

  2. #2
    Guest
    This code will copy exactly the same form. And go to the link opened using the Webbrowser control.

    Code:
    Private Sub webbrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
    Dim F As New form1
        Set ppDisp = F.webbrowser1.object
        F.Show
    End Sub
    If you do not want the user to be able to open a new link to another page at all.

    Code:
    Private Sub webbrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
        Cancel = True
    End Sub
    [Edited by Matthew Gates on 07-04-2000 at 11:27 PM]

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2000
    Location
    Shropshire, England
    Posts
    14

    Smile Thankyou, but..............

    the webbrowser control i am using does not allow ne the option newwindow2, do i have an old version of the dll??
    Were all drowning!

  4. #4
    Guest
    What version of Internet Explorer are you using? I have version 5.00.2614.3500.

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