|
I've tried adjusting the color of the label's MouseMove Event event. When the mouse moves to a label, it doesn't work at all. Is there a better way?
Private Sub LbMain_MouseMove (Index As Integer, Button As Integer, Shift As Integer, x As Single, Y As Single)
Dim i As Integer, iLeft As Long, iRight As Long, iTop As Long, iBottom As Long
i = Index
iLeft = LbMain (i) .Left
iRight = LbMain (i) .Left + LbMain (i) .Width
iTop = LbMain (i) .Top
iBottom = LbMain (i) .Height + LbMain (i) .Top
If x> iLeft And x <iRight And Y> iTop And Y <iBottom Then
LbMain (i) .ForeColor = vbBlue
Else
LbMain (i) .ForeColor = vbBlack
End If
End Sub |
|