Results 1 to 3 of 3

Thread: How can I get Web address in each of a few open Int Expl windows ...?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Auckland, NZ
    Posts
    182
    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.

  2. #2
    New Member
    Join Date
    Nov 2000
    Posts
    6

    Thumbs up

    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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    Auckland, NZ
    Posts
    182

    Cool

    Thanks, Lee. i will have a look at your code.

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