A HIGHLIGHTED LABEL

By | 2002-06-01

This code was publshed before, but this is a much simpler way. This code is very cool! When you move a mouse over a label, the text lights up! When you move your mouse off of the label, the text turns back to its original color. VERY COOL, VERY EASY!

Original Author: SeeD

Inputs

Follow these easy directions (o:
1) Start up a new project in your Vb.
2)Make a label. It doesn’t matter what you change the caption to, but keep the text color black!

Code

'Put this into the Form_MouseMove.
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H80000012&
End Sub
'Ok, now stick this part into your Labels Label1_MouseMove
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H000000FF&
End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.