mouse move event

  • Thread starter Thread starter John
  • Start date Start date
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
 
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
 
Back
Top