pointer finger

Amy35

Registered User.
Local time
Today, 13:02
Joined
Mar 12, 2002
Messages
53
After being agravated at the way the command buttons looked (that dull gray), I changed them to labels. Now I would like the mouse pointer to do something when it is over the label. Either change to a pointer and then maybe an hour glass after it's clicked or change the color on the label when the mouse is over it.
What do you guys suggest and how in the heck can I accomplish it? Thanks!

Amy
 
This changes the mousepointer to an hourglass

DoCmd.Hourglass True

DoCmd.Hourglass false

returns to normal state

SUB lbl.MouseMove
lbl.ForeColor = 255
END SUB

changes the label color, you would need to test diferent colors and get their numeric value and use it with this code... if you really wanted to get fancy you could apply counters of sorts and change colors depending on the counters value...

Have fun....
 
Thanks ...how to get it back?

How do I get the color to go back after I change it on the mouse move event. I can get it changed when the mouse moves over, but since it's a label there's not alot of events to choose from. How would I get the color back to it's original state when the mouse moves of the label? Thanks

Amy
 
Hmmm.... :)
Well... You could use a timer... You will have to work with sequence of events on your form, or build in functions... I must warn you if you set this up on mouse move as shown above... The application is always changing the color. This could be avoided by setting a condition to true after it has changed colors. I had once set up info to change in labels when the mouse was moving.. I returned to normal state on mousemove on the form once it left the label or command button...

Again this is all trivial and depends on testing and cosmetic preference...

Sorry if I could not be of more help...
:cool:
 
Amy,

You might try something like this (code behind the form):

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label24.ForeColor = QBColor(15)
Label25.ForeColor = QBColor(15)
End Sub

and these:

Private Sub Label24_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Label24.ForeColor = QBColor(14)
End Sub

Private Sub Label25_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Label25.ForeColor = QBColor(14)
End Sub

What this does is change the forecolor of the text, rather than the backcolor of the label. To get the forecolor "restored", the sub for the Detail section resets each Label's forecolor.

You can easily modify this to change the backcolor the way you want.

HTH,

Tom
 
Thanks!

That was exactly what I was looking for. Wish I was more knowlegable and knew what the heck I just did.
It's working great, only thing is when the form first opens, form looks fine then a second late all the labels flicker the forecolor a couple times and then the form looks fine. Do you know what would cause this freaky behavior?

This is where the color gets chosen (the one the form is flasing on open);
Private Sub Detail_MouseMove(Button as integer, shift as integer, x as single, y as single)
Label24.ForeColor = QBColor(1)
'then 10 other labels in here with the same QBColor(1)
End sub

I have a separate sub routine for the mouse move event of all the other labels.

I could always put up with the flickering although it'll be pain dealing with those users who just can't wait to report when they've found something wrong.

Thanks for all your help!

Amy
 
You're welcome!

What you did was tell Access the following: when the Pointer goes over a Label (Label's Mouse Move event), change the Forecolor to the value shown. Unless you tell Access anything else about the label, its Forecolor will stay the same.

So you told Access when the Pointer moves over the Detail section, change every Label's Forecolor to something else (usually to restore the original color). That's the easy part.

As for the flicker, I'm not totally sure. It could mean that system resources are low, and your computer is trying to work things out. I think someone else may have to help you on this.

While some people will take it to mean that the db is broken, that's definitely not the case. If you can kid you co-workers, you might try telling them it's a deep secret, and you had to work hard to get it to flicker just that way. Or it's a feature. :) (Of course, you might find different results if your co-workers open Access first, do their work in Access, and open the other programs later.)

Good luck!

Tom
 
Screen flicker

Amy,

Just spotted the following on the Microsoft Knowledge Base (MSKB) - about screen flicker in Access 2000. It's about a third of the way down the page. You can find the article (Q210178) here.


Display Problems When Scrolling Through the Employees
Form in Northwind
---------------------------------------------------------
In the Northwind sample database, the display might
flicker when you scroll through the records in the
Employees form.

>>> To prevent this problem:

1. In Windows Control Panel, double-click the Display
icon, and then click the Settings tab.

2. In the Color Palette box, click a setting with more
than 256 colors.

NOTE: If your system does not support more than 256
colors, you will not be able to select a higher
setting.


HTH,

Tom
 
Thanks Tom

I actually took a couple days off work, so I didn't get your post til this morning.
I changed the color in the control panel and it fixed the flickering. Just in time since this whole db went live yesterday (while I was out...gotta love this place). I really appreciate your help! Thanks a bunch :)

Amy
 
Here is how to change the mouse pointer...

Here is an easy way to change the mouse pointer into the "pointing finger" and it does not require any code!

For each object that you want to change, key a single "space" in the objects "Hyperlink Address" property field. You will then want to change the color and underline formats if you are using text captions. That's it!

The mouse pointer will change from your computers default into the pointing finger (like on a web page) when the mouse is hovering over that object.

Nice effect for those that want any easy way to customize their forms.

Also, this will hide the web toolbar if that becomes a problem...
DoCmd.ShowToolbar "Web", acToolbarNo

HTH
 
That is my kind of programming

NO CODE! it worked great. Thanks for the trick I appreciat it!

Amy
 

Users who are viewing this thread

Back
Top Bottom