Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE Automation - HWND throwing error..

Status
Not open for further replies.

EzLogic

Programmer
Aug 21, 2001
1,230
0
0
US
Weird situation

IE 11
Windows 7 Pro 64 Bit
On this machine.
Code:
loIE = CreateObject("InterNetExplorer.Application")
loIE.visible = .t.
loIE.Navigate2(".etc....")

?loIE.HWND && Throws Error..

loIE.navigate2("etc..") && works
loIE.Quit
Release loIE

I am not sure why I cannot see the HWND for the IE
I see it running in the task bar

On my other 4 machines and my dev machine its returning the HWND but, not on this particular machine.

Any idea on how to get the HWND of the IE object? i think it has something to do with it being 64bit

Ez Logic
Michigan
 
Your code works correctly for me. Obviously it is something specific to your one machine on which it doesn't work, but it's hard to think what that could be. I wouldn't have thought that the fact of it being 64-bit would be relevant, but what do I know.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Windows 7 Ultimate 64 Bit and it's working okay with IE 11.

But like Mike I can't contribute a solution or what to look out for. I have IE in protected mode, but still can get HWND, otherwise I would have tested that setting, which was automation unfriendly, as it was introduced with IE9.

Bye, Olaf.
 
Just tested on a machine with
IE 11
Windows 7 Pro 64 Bit

But no problems encountered.


Respectfully,
Vilhelm-Ion Praisach
Resita, Romania
 
It works on windows 10 and windows 7 machine and my other laptop and almost 1500 other clients i have.

I ran into 2 clients, where it works on their other machines, but, 1 of their machines (each), had weird situation

I personally logged in to their machines, installed my own tool which gives me IDE of VFP (dbu) and i could not get the HWND

I do believe it has something to do with how IE is configured on 64bit only or something.. but, so weird i cannot get the hwnd of IE

Ez Logic
Michigan
 
As said by three of us now, 64bit is not the problem.
I also just tested on Windows 8.1 Professional 64bit, again no problem.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top