Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

InternetExplorer.Application Code translate to  IHTMLDocument2 interface code

Posted on 2011-02-17
6
Medium Priority
?
571 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

636 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