Results 1 to 6 of 6

Thread: [RESOLVED] web browser links

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Resolved [RESOLVED] web browser links

    i have searched this site for help but couldnt find what i was looking for. when a user clicks on a link on a webpage using the web browser control a new link will open in IE how can i open the new link in my browser
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  2. #2
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Re: web browser links

    Quote Originally Posted by joel2892
    i have searched this site for help but couldnt find what i was looking for. when a user clicks on a link on a webpage using the web browser control a new link will open in IE how can i open the new link in my browser
    easy as pie 4 lines of code no components or api's just

    VB Code:
    1. private sub label1_click()
    2. dim ie
    3. Set ie = CreateObject("INTERNETEXPLORER.application")
    4. ie.navigate label1.caption
    5. ie.Visible = True
    6. end sub

    now just make the label for example blue and have it say "www.google.com" and it will goto google when clicked

  3. #3
    Lively Member
    Join Date
    Jul 2005
    Posts
    83

    Re: web browser links

    They mean, when you click on a link on a WEBSITE it opens internet explorer, they want it to open in their BROWSER

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: web browser links

    so how could i do that
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

  5. #5
    Fanatic Member TheVader's Avatar
    Join Date
    Oct 2002
    Location
    Rotterdam, the Netherlands
    Posts
    871

    Re: web browser links

    Try this:
    VB Code:
    1. Private Sub WebBrowser1_NewWindow2(ppDisp As Object, Cancel As Boolean)
    2. Dim frmBrowser As Form1
    3. Set frmBrowser = New Form1
    4.  
    5. Set ppDisp = frmBrowser.WebBrowser1.Object
    6. frmBrowser.Show
    7.  
    8. Set frmBrowser = Nothing
    9. End Sub
    Author for Visual Basic Web Magazine

    My articles on the Web Browser Control:
    Using the Web Browser Control & Using the DHTML Document Object Model

    The examples referenced in the articles can be found here:

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2005
    Posts
    292

    Re: web browser links

    thanks
    'Rarely is the question asked: Is our children learning?' George Bush

    visit my website @ www.freewebs.com/vbplanet

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