Results 1 to 2 of 2

Thread: [RESOLVED] [2005] Get IE Url

  1. #1

    Thread Starter
    Hyperactive Member knxrb's Avatar
    Join Date
    Jul 2007
    Location
    United Kingdom
    Posts
    321

    Resolved [RESOLVED] [2005] Get IE Url

    [EDIT] Doesn't matter I solved it [EDIT]

    I need my application to get the current url from Internet Explorer 7(tabs).
    I have got the following code that gets all urls open at the time but I need to find out which one is the one the user is currently viewing.

    Code:
                Dim browser As SHDocVw.InternetExplorer
                Dim myLocalLink As String
                Dim myDoc As mshtml.IHTMLDocument2
                Dim shellWindows As SHDocVw.ShellWindows = New SHDocVw.ShellWindows()
                Dim filename As String
                For Each pc As SHDocVw.InternetExplorer In shellWindows
                    filename = System.IO.Path.GetFileNameWithoutExtension(pc.FullName).ToLower()
                    If filename = "iexplore" Then
                        browser = pc
                        myDoc = browser.Document
                        myLocalLink = myDoc.url
                        MessageBox.Show(myLocalLink)
                    End If
                Next
    Please help, Thanks
    Last edited by knxrb; Nov 22nd, 2008 at 08:51 AM.
    Did I help you with your problem? If I did rate me by clicking here: Rate knxrb

  2. #2
    Addicted Member
    Join Date
    Mar 2008
    Posts
    150

    Re: [RESOLVED] [2005] Get IE Url

    What's the solution for future reference?

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