Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / September 2004

Tip: Looking for answers? Try searching our database.

Terminate iexplore programmatically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ronny Sigo - 01 Sep 2004 19:12 GMT
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
Tom van Stiphout - 02 Sep 2004 01:54 GMT
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
[quoted text clipped - 4 lines]
>Many thanks,
>Ronny
Ronny Sigo - 02 Sep 2004 07:35 GMT
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

> Several things you could do:
> * Rather than firing up IE, use a webbrowser control on an Access
[quoted text clipped - 20 lines]
> >Many thanks,
> >Ronny
Tom van Stiphout - 02 Sep 2004 15:00 GMT
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
[quoted text clipped - 32 lines]
>> >Many thanks,
>> >Ronny
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.