?
Solved

InternetExplorer.Application Code translate to  IHTMLDocument2 interface code

Posted on 2011-02-17
6
Medium Priority
?
568 Views
Last Modified: 2012-05-11
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.
0
Comment
Question by:daypro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 34922138
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?
0
 

Author Comment

by:daypro
ID: 34922489
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
0
 
LVL 28

Accepted Solution

by:
Ark earned 1500 total points
ID: 34940978
ShowWindow(hWnd,SW_HIDE)?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Closing Comment

by:daypro
ID: 34941073
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?
0
 
LVL 28

Expert Comment

by:Ark
ID: 34941097
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.
0
 

Author Comment

by:daypro
ID: 34941595
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


0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 16 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question