Click to See Complete Forum and Search --> : How can I get Web address in each of a few open Int Expl windows ...?
bona
Nov 15th, 2000, 08:26 PM
How can I get:
-URL,
- and text in a Status bar,
of all open Internet Explorer windows? I can get window handles for those child windows of IE ('Edit'and 'msctls_statusbar32' classes names), but not the text itself.
API function GetWindowText doesn't work here.
Lee Hindmarsh
Nov 16th, 2000, 06:28 AM
My reply may help you arrive nearer your goal.
In your VB project, you have to make a reference to MS HTML Object Library and MS Internet Controls.
Then, insert these declarations:
Dim ShellW As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer
Some where in your code, you can retrieve the actual URL and the instance's window text with:
For Each IE In ShellW
MsgBox IE.LocationURL
MsgBox IE.LocationName
Next
If you have an instance of Windows Explorer open then you may receive an error as Explorer does not understand the URL call. This code works on my machine but there may be extenuating circumstances which prevent it from working on your machine. You can view the Object Browser to see the huge amount of properties/events etc. that can be called with the SHDocVW object.
bona
Nov 16th, 2000, 12:40 PM
Thanks, Lee. i will have a look at your code.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.