creating a "runaway" button

exo

Registered User.
Local time
Yesterday, 23:22
Joined
May 21, 2009
Messages
23
A break from the more serious threads. Using jscript on a website it is possible to make a user button "runaway" from the mouse cursor.

Got a new guy coming in to learn one of the databases I've created and I'd like to have a little fun, so I was thinking about doing something similar with the command buttons on the form. Anyone have any ideas how to accomplish this?

Thanks =)
 
Not sure you can use javascript. But you could always pop "Formatting drive C:" and a rapidly progressing progress bar :)
 
I was not so much expecting to use javascript as finding another way to accomplish this. I spend most of my time working with the queries and such... not nearly as familiar with forms.
 
Hmm - there is an event OnMouseMove. You could make the button disappear and make another button visible elsewhere ... with same tricky property:) and so on ...
 
Thank you for the suggestion, I'll look into this
 
Is there a way to make it auto focus on the text box? Otherwise it will just error out when the form opens?
 
of course there is . Hint: SetFocus.
 
Arg, I hate forms. So I go look up "setfocus" and it just tells me to type:
Forms!Employees!EmployeeID.SetFocus

Where does one type this? The buttons properties does not have a setfocus section.... As I said before, i really don't know forms very well. I make buttons that run processes, and beyond that - nothin.
 
I also worry that then I have to have a random text box that has nothing to do with the form itself..... as the object with setfocus defined can't be hidden..... Maybe I can set it outside of the window...? But then the setfocus would shift to it I believe.
 
figured out the setfocus issue.... now it is just a matter of setting it to something unobtrusive thanks for the help getting here.
 
Here is a little demo that will hide the command button when the cursor gets near it.

In this case I am setting the focus to a hidden text box so I can hide the button control because I do not have any other controls on the form, but if you have a form with other controls you can just set focus to one of your other controls.

You will need to play with the actual X and Y points to get them to work on your form but this should give you an idea.
 

Attachments

Users who are viewing this thread

Back
Top Bottom