Results 1 to 3 of 3

Thread: Starting and positioning internet explorer - help!

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Question

    Why am I having so much trouble with this?

    Ok, I admit I'm a bit of a newbie at APIs, but not THAT new.

    I want to start Microsoft Internet Explorer using VB, then position it on the screen so it works well with my program. How can I do this?

    What I've done and what's happening:
    I am using a program I wrote a while ago that uses Shell to start a program and then gets that program's hWnd from the processID returned by Shell.

    I know it works fine because I use can use it with no problem with other programs such as Notepad. I can shell it, get the handle, and then do things like set the window text using the handle.

    With explorer, it doesn't work. So I used GetWindowRect to see if I could figure out what I was getting, and each time the handle returned from shell refers to some window that has no caption and it's RECT is:

    Left = 0
    Right = 100
    Top = 0
    Bottom = 100

    Also, I ran another program that lists all running window handles after shelling explorer with the first program, and the hWnd returned from the first program doesn't show up on the list of running windows.

    I can only guess that shelling explorer opens one window which then starts another window?

    Any help would be greatly appreciated. At the moment I am using a lame routine that uses EnumWindows and compares the last part of each window's text to the string, "Microsoft Internet Explorer" in order to get the handle. LAMENESS!

    Thanks!

    ~seaweed

  2. #2
    Addicted Member
    Join Date
    Nov 1999
    Posts
    184
    Hey,

    Ive ran into the same problem.
    OK This is the deal.

    When You Write

    Shell "C:\Program Files\Internet Explorer\Ie.exe"

    Of What ever.

    Im getting the idea that it starts One form
    which checks some REG settings then it opens
    the next form which is the actually window.

    So it returns you the splash screen I guess.

    Does that make sence?
    Evan Duffield --------
    --- [email protected]
    - -
    VB6 - Learning Edition
    - -


  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2000
    Location
    Bellevue, WA, USA
    Posts
    1,357

    Thanks

    That's what I figured the problem was, but there must be some good way to start Explorer (or the Default browser would be even better) and get it's handle for purposes of positioning it and closing it later.

    Can anyone help?

    ~seaweed

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