Link to home
Start Free TrialLog in
Avatar of daypro
daypro

asked on

InternetExplorer.Application Code translate to IHTMLDocument2 interface code

Suppose
  IeA is  Created by IeA= CreateObject("InternetExplorer.Application")
  IeB is  get by IHTMLDocument2 interface

Then IeA.Visible=false  this code is OK

How the equal code to set IeB  invisible ?

In other words
 IeB.??????? ???????  Eaqals IeA.visible=false

Thanks.
Avatar of kaufmed
kaufmed
Flag of United States of America image

Those, TMK, are not one in the same. IeA is an Application, whereas IeB is a document. Think of it like this:  IeA is an instance of IE. This instance has a member called "Document". This is what IeB would point to.

With IeB, you can interact with the html of the page you are viewing, but not with the application hosting the page. How did leB get assigned?
Avatar of daypro
daypro

ASKER

Thanks for the explaination

IeB is assigned by like below example(get by window handle)
 
hWnd = 6817178 'ie window handle
set IeB=hHndToIE(hWnd) (hHndToIE is user define funtcion )

is it possible set IeB  invisible? (I can handle the button in IeB like submit but do'nt know how to set ieb invisible)
thanks
ASKER CERTIFIED SOLUTION
Avatar of Ark
Ark
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of daypro

ASKER

thanks,it's a correct way to try,
since   ieB is get from hWnd
it can be use hWnd to hide the iE

if possible,can you give me the function code
 to hide in background object   from  hWnd?
Sorry, what do you mean by 'background object'? Since you have window's hWnd you can do whatever you want with it using API:
ShowWindow with SW_HIDE,SW_MINIMIZE etc (see http://msdn.microsoft.com/en-us/library/ms633548(v=vs.85).aspx)

Close window using SendMessage/PostMessage with WM_SYSCOMMAND+SC_CLOSE or with  WM_CLOSE

Enum it's children or GetParent
etc.
Avatar of daypro

ASKER

thanks the help,
in this situation  i mean 'background object'  hide(SW_HIDE)
using API
 ShowWindow(hWnd,SW_HIDE) is just the  solution

thanks for the Ark   and kaufmed useful help

ps:
I press the point too quickly,
if i can redo ,kaufmed can get 1/3 point