By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Terminate iexplore programmatically

P: n/a
Hello all,
I have made a button in access which opens iexplore and directs it to a
certain website.
I have use a piece of code written by Dev Ashish. So far so good. But now I
need to know how I can programmatically close iexplore again....
Does anybody have ideas?
Many thanks,
Ronny
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Wed, 1 Sep 2004 20:12:26 +0200, "Ronny Sigo" <roon ad skynet.be>
wrote:

Several things you could do:
* Rather than firing up IE, use a webbrowser control on an Access
form. Very elegant, and you have lots of control over what gets
displayed and what the user can do.
* When starting IE, do it in such a way (perhaps: CreateProcess) you
get an instance (module?) handle that you can later use to close it.
Knowledge of Windows APIs helps.
* You could use Windows APIs to enumerate all main windows (or,
perhaps, use FindFindow), get the window handle, inspect the titles
and/or other properties, and send a WM_CLOSE message to the one you
want to close.

I like option 1.

-Tom.
Hello all,
I have made a button in access which opens iexplore and directs it to a
certain website.
I have use a piece of code written by Dev Ashish. So far so good. But now I
need to know how I can programmatically close iexplore again....
Does anybody have ideas?
Many thanks,
Ronny


Nov 13 '05 #2

P: n/a
Hello Tom,
Thank you for responding. The problem is that my skills as a programmer are
elevated enough to fool around in visual basic, but I never got to learn
about API's (not that I don't wan to, but time is an issue) This opening an
closing of IE, however has become a very urgent matter for me. This opening
an closing must be done without intervienience of the user. So what I would
need is an piece of code that I could use to perform both actions ... Would
you know where I could find this?
Many thanks in any case !
Ronny

"Tom van Stiphout" <no*************@cox.net> schreef in bericht
news:uh********************************@4ax.com...
On Wed, 1 Sep 2004 20:12:26 +0200, "Ronny Sigo" <roon ad skynet.be>
wrote:

Several things you could do:
* Rather than firing up IE, use a webbrowser control on an Access
form. Very elegant, and you have lots of control over what gets
displayed and what the user can do.
* When starting IE, do it in such a way (perhaps: CreateProcess) you
get an instance (module?) handle that you can later use to close it.
Knowledge of Windows APIs helps.
* You could use Windows APIs to enumerate all main windows (or,
perhaps, use FindFindow), get the window handle, inspect the titles
and/or other properties, and send a WM_CLOSE message to the one you
want to close.

I like option 1.

-Tom.
Hello all,
I have made a button in access which opens iexplore and directs it to a
certain website.
I have use a piece of code written by Dev Ashish. So far so good. But now Ineed to know how I can programmatically close iexplore again....
Does anybody have ideas?
Many thanks,
Ronny

Nov 13 '05 #3

P: n/a
On Thu, 2 Sep 2004 08:35:25 +0200, "Ronny Sigo" <ro********@skynet.be>
wrote:

This page:
http://www.mvps.org/access/api/api0004.htm
has most of the code you'll need.

I'm assuming you have a Open IE and a Close IE button. The first would
get all this code without the WaitForSingleObject and CloseHandle
lines, whereas the latter would get the CloseHandle line. Note that
proc should be a form-level global variable.

-Tom.

Hello Tom,
Thank you for responding. The problem is that my skills as a programmer are
elevated enough to fool around in visual basic, but I never got to learn
about API's (not that I don't wan to, but time is an issue) This opening an
closing of IE, however has become a very urgent matter for me. This opening
an closing must be done without intervienience of the user. So what I would
need is an piece of code that I could use to perform both actions ... Would
you know where I could find this?
Many thanks in any case !
Ronny

"Tom van Stiphout" <no*************@cox.net> schreef in bericht
news:uh********************************@4ax.com.. .
On Wed, 1 Sep 2004 20:12:26 +0200, "Ronny Sigo" <roon ad skynet.be>
wrote:

Several things you could do:
* Rather than firing up IE, use a webbrowser control on an Access
form. Very elegant, and you have lots of control over what gets
displayed and what the user can do.
* When starting IE, do it in such a way (perhaps: CreateProcess) you
get an instance (module?) handle that you can later use to close it.
Knowledge of Windows APIs helps.
* You could use Windows APIs to enumerate all main windows (or,
perhaps, use FindFindow), get the window handle, inspect the titles
and/or other properties, and send a WM_CLOSE message to the one you
want to close.

I like option 1.

-Tom.
>Hello all,
>I have made a button in access which opens iexplore and directs it to a
>certain website.
>I have use a piece of code written by Dev Ashish. So far so good. Butnow I >need to know how I can programmatically close iexplore again....
>Does anybody have ideas?
>Many thanks,
>Ronny
>


Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.