vb.net current url

hi,
I am trying to learn vb.net.
I came up with an idea for a project which will pretty much be a list of url's, when I click on them, I would like to have explorer open and go to that page.

I would also like my program to be able to capture the url of the last ie that was used.

so I would have ie open, if I want to add this bookmark to my program, I would open my program and hit a button.

My question is, how do I get the url of the last active explorer window.
I am not going to close the window, I just want to get the url of the one that was active before opening my program, the one that would pop up if I hit alt tab.

Thanksk
jackjohnson44Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

koolnurdCommented:
you can open an IE like this...........

The heart of the code is exposing the IWebBrowserApp interface. This interface is located in the SHDocVw.dll, which can be found (on Win2K/Xp) in the System32 directory.

The source code is simple:

Imports SHDocVw

Sub OpenBrowser(url As String) '
Dim o As Object = Nothing

Dim ie As New SHDocVw.InternetExplorerClass()

Dim wb As IWebBrowserApp = CType(ie, IWebBrowserApp)
wb.Visible = True

'Do anything else with the window here that you wish
wb.Navigate(url, o, o, o, o)
End Sub 'OpenBrowser

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.