[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 :D
Re: [RESOLVED] [2005] Get IE Url
What's the solution for future reference?