Animated - Auto Hide Form

Pleasure

Registered User.
Local time
Tomorrow, 01:23
Joined
Jul 26, 2005
Messages
44
My fellow developers

I want to develop an Ms Access Main Form, which will be able to :

 Move automatically to the Left of the Database Window
 On Mouse over to be able to show with animation (done that)
 When Mouse pointer isn’t on the form to be able to hide with animation (partially done, only when the form loses focus)

Actually I want to have a form with buttons placed on the left of my desktop (hiding Ms Access Window – done that after Internet searching), which will be hidden and when I move my mouse pointer over the form to show.

Check my example. I’m waiting for your comments – suggestions

Best Regards
Theodore
 

Attachments

Posting just to put it up. Please if anwone can give at least some directions. I know it is too hard to implement such a thing with ms access. Anyone ? :) :) :)
 
Very cool. :)

The first part - to position the window - is actually very easy.
You can use an autoexec macro, and use the action MoveSize. You simply specify a value of 0 for both the Right and Down arguments, and the window will end up in the top left corner of your database window.
First you use OpenForm to load your form, and then apply the MoveSize command.
 
Thanks a lot for your answer Niniel. Never thought again using macros. But I am going to do it exactly as you explained. The big problem is that I want the form to roll up again (dissapear) when the mouse has left the form (detail).

This is the tough one :) :)
 
Why is it so difficult? It's on working when you put your code in the On Lost Focus event?

Actually, that does work, because when you click on another window in the database, and the form loses focus, it does minimize.
But I guess you want the same effect you get when it expands, in other words, you want your mouse hovering over another window to make your command window small, right?
Have you tried putting the MouseMove code you have in the animated form into the other forms as well, so that when your mouse is over them, they'll get the focus.
 
Last edited:
Are you going to create another form to go behind this one? If so you could use that forms got_focus event to hide the form again.
 
Niniel and KeithG you are right. I can make the other forms to minimize the primer form. This is easy by performing some actions on the other form's "on activate" or "on focus".

But imagine that the only form that will be visible is the main form (Ms Access Window will be hidden). The main form will be placed on the left of my desktop and after clicking a button on that form then the Ms Access Window will appear and some actions will take place.

I can do that easily. But after I activate the main form (it expands) I don't have any other form visible to move the focus. That's why I can't Roll Back thw main form. No new form to focus on. The same will happen if someone wont make a selection on the main form.

The point is that is it possible to make the main form to roll back when the mouse moves away ? Something like on Forms mouse over=false :):):)

Thank a lot for your comments. I believe that if we will solve this we can have a very nice custom interface to use with our Access Databases.
 
Anyone else please ? Any comments, suggestions, ideas ? Is there any way, any event, to understand that the mouse pointer isn't over a form ?

Thanks a lot (again) ... :)
 
Sorry, I don't know a way.
But you could try to put a timer on your form, so that it minimizes by itself after a [short] period of time.
 
Niniel said:
Btw, how do you hide the main Access window?

Just follow the directions

http://www.tek-tips.com/faqs.cfm?fid=2562

but remember :

Make your forms popup and modal = true otherwise nothing will be desplayed.

As for the autohidden form, I believe that using the timer event is a good idea. But certainly isn't as nice as the method we are searching.

Thanks a lot Niniel. You really helped me a lot. I hope that someday, somehow we will find a way to do this. I really couldn't believe that VBA will end up on something like this. So time to face the truth and start using the timer event. :(
 
heyyyyyyyyy !!!!!

Maybe there is a way to find the mouse coordinates and if it is inside the forms rectange (in pixels like .left, .top, .right, .bottom) then the form will rise Up.

What do you think about this idea ...
 
Last edited:
Just have a look at Windows manipulation sample (Peter's software - Freeware).

There is a way to find out the form's rectangle in pixels. The problem now is how to find the mouse coordinates in pixels too :) :) :)
 

Attachments

You would have to use fuctions fromm one of the windows s API's to retrieve the location of the mouse pointer.
 
KeithG said:
You would have to use fuctions fromm one of the windows s API's to retrieve the location of the mouse pointer.

Thanks KeithG but I really wish I could do that. :):) I don't know how. Perhaps a search on the web ...
 
The big problem is that the label's "on mouse move" event sometimes does not undestand that the mouse has moved, espesially when you move it very very fast. Any suggestions ????

Anyway thanks a lot for your help and now I believe that we have a brand new way to implement main forms ...
 

Users who are viewing this thread

Back
Top Bottom