Changing label colour on rollover

GrahamUK33

Registered User.
Local time
Today, 06:34
Joined
May 19, 2011
Messages
58
Is it possible to change the colour of the text on a label on hoover, and then change colour back when mouse has moved away, or label has lost focus?
 
Use the labels OnMouseMove event to cng color.
form's Section(formheader or detail, etc) mousemove event to reinstate the color.
 
Use the labels OnMouseMove event to cng color.
form's Section(formheader or detail, etc) mousemove event to reinstate the color.

I tried that, the colour flickers/flashes when the mouse moved around.

The code below does the same, but without the flickering/flashing:

MouseMove on label
If Not Me.lblLabel1.ForeColor = RGB(68, 84, 106) Then Me.lblLabel1.ForeColor = RGB(68, 84, 106)

MouseMove on form
If Not Me.lblLabel1.ForeColor = RGB(127, 127, 127) Then Me.lblLabel1.ForeColor = RGB(127, 127, 127)
 
Yes ofcourse you only need to chg the color once.
 

Users who are viewing this thread

Back
Top Bottom