I don't think that you can change the color of a label. You can change the control's backcolor this way:
Private Sub Record_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.TextBox.Backcolor = 12775
End Sub
However, you can put another label on top of your original label, set it to not visible and change its backcolor to what you want, and do some code like this:
Private Sub Record_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Label1.Visible True
Me.Label2.Visible False
End Sub
HTH,
jbehrne
If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations
So if I go with two label, on MouseMove for one, I make Label2 visible and Label1 not visible. So how do I get Label1 visible again? If I do MouseMove on Label2, then I have a repetitive motion.
You would get the original label back again by using control's "Lost Focus" event:
Ex:
Private Sub Record_LostFocus()
Me.Label1.Visible False
Me.Label2.Visible True
End Sub
If you wanted it to stick for awhile you could use a timer event, or the form's "On current" event... There are many ways to get the original label back - when do you want it to show again?
If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.