Triggering event on Application lost focus

Transentient

Registered User.
Local time
Today, 10:50
Joined
Sep 25, 2007
Messages
31
I have a an access97 database, with two toolbar forms. In order to ensure the toolbar forms stay in the correct place, even when the main form is moved, I have used a timer event on each which checks the toolbar positions against the main form every 1second.

Everythin works ok, unless I move to the desktop, when I get an error message 6 - overflow. Which appears to be resulting from the toolbar.

My idea is when the database application looses focus, i.e. i move out of access, I want to be able to deactivate the positioning check code, and reactivate it when I enter access again.

I have looked around but can find nothing I can make work. Unfortunately I only have VBA in access97 to work with.

Any help or idea's, even a better way to lock the toolbars to the main forms positioning?

many thanks
 
Hi,

Change your toolbar form's BorderStyle Property to "NONE". This way it will not be possible to move it, unless user makes a lot of tricks. This way you don't have to use timer, and you should not (as far as you mention)

HTH
OlcayM
 

Users who are viewing this thread

Back
Top Bottom