mouse move event

J

John

I have several labels that provide info. I would like to
have the label raise and the font go bold (both without
the flickering) when the mouse is moved over the top of
the label then go back to flat and normal when the mouse
is off the label. Can someone get me started on this?
Thanks...John
 
D

Damon Heron

John,
Here's one way. I just put the fontbold on one label, but you get the idea.
Add a couple of text boxes to track the twips parameters, then define your x
y fields for all of your labels. In the mouse move event of the detail
section of the form, add:

Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me!Label10.FontBold = False
End Sub

Private Sub Label10_MouseMove(Button As Integer, Shift As Integer, X As
Single, Y As Single)
Me!txtX = X 'these textboxes can be made invisible after you determine the
label's location...
Me!txtY = Y
Me!Label10.FontBold = False
If (X > 0 And X < 2205) And (Y > 0 And Y < 405) Then Me!Label10.FontBold =
True
End Sub

Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top