Internet Automation Popup Box

Hi Darbid,

I've attached another database file where I'm trying to get it to work with IE in it's own window.

You can see that I'm trying different variations in case the hwnd is different when IE is outside of the form.

Joe
 

Attachments

I hope you are learning lots and at the same time pulling your hair out :-)

First I want to tell you that I am not an expert with this stuff and I am getting to the edge of my knowledge.

In my opinion IE is freezing the whole access program. I cannot get the timer to fire at all when working with your DB.

By the way to find the window as I said in a earlier post the name of the window is important. For example I am home now on Vista with IE8 and that window is called "message from webpage" you are going to have to deal with all these names.

I think your options are to either give people a form in access on which is the webbrowser control.

The second option is you are going to have to build an .exe file which is not that hard for your timer.

I built one in VB6 which I still have but you could do it with VB.net express.

It is exactly the same code only in an exe.

Then you fire the .exe
hit the login
.exe will fire because it is a totally different program on a different thread.
as soon as the dialog is gone your access code will continue.

If these dont work for you, you could code it in another office program like word or excel. I cannot because the work computers have a high security level and any VBA code has to be agreed to each time by the user, but if you can execute VBA code from another office program then your timer could be in the program. All office programs can work invisible except Powerpoint so no one would see it.
 
Hi Darbid,

I just got back from vacation, so sorry for the long reply.

I originally made the program on Excel because that is closest to the end user. It has the same problem in Excel but I never tried opening IE from a form.

I think what is happening is that VBA was never designed to be multithreaded. When you open IE from a form I think we are able to get it to do two things at once because it has to listen for events.

Your thoughts about using an exe or another invisible office program are both good ideas. My work permissions just require the user to say that they trust me one time and then my program can do it's thing so that might work.

I'll let you know how it works out. I hate being forced to use office 2003 and IE6 I feel like a caveman :)

Type to you later,

Joe
 
I am not much better 2003 IE7 (since Jan 2010).

I am going to make a wild guess - The dialog of IE locks the handle of the calling program. Thus when you control IE from an Office program then the whole office program is locked.

When you host the Webbrowser control on a Form then the calling handle is the form. Thus only the form is locked but the rest of the office program is free to work.

I have done a lot of work on this cause I had the same problem with the "Browse" button to add files to an internet site.

During testing I was using IE and had all your problems, thus I made a little VB6 program. Then I was surprised when a module would do the same job as soon as I was using a form for my WB.
 

Users who are viewing this thread

Back
Top Bottom