Solved

InternetExplorer.Application Code translate to  IHTMLDocument2 interface code

Posted on 2011-02-17
6
546 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
  • 3
  • 2
6 Comments
 
LVL 74

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 27

Accepted Solution

by:
Ark earned 500 total points
ID: 34940978
ShowWindow(hWnd,SW_HIDE)?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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 27

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now