Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mouse Move

Status
Not open for further replies.

vistor

Technical User
Dec 22, 2000
164
US
Hi,

I've got the following code to underline a label to note that it is a link when user mouses over it:

Private Sub lblReturn_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblReturn.FontUnderline = True
End Sub

Is there a way to remove the unerline when the mouse moves off? I've tried FontUnderline = False on the MouseDown but has no effect.
 
You could use the form's mouse move event like this

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblReturn.FontUnderline = False
End Sub

Hope this helps.[spin] If you choose to battle wits with the witless be prepared to lose.
[machinegun][hammer]
 
Private Sub frmForm1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

lblReturn.FontUnderline = false

End Sub

You coudld try that...

MG
 
Private Sub frmForm1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

lblReturn.FontUnderline = false

End Sub

You coudld try that...

MG
 
Just be aware that if you quickly move the mouse to another control, or off your form, then there is a good chance that the form will not actually receive a MouseMove event
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top