|
-
May 12th, 2000, 12:51 PM
#1
Thread Starter
Frenzied Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|