Results 1 to 2 of 2

Thread: HighLight Label with move move over label

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    North East America
    Posts
    463

    Post

    I have a program that when a mouse moves over a label it changes color. I can do the first color change fine but when the mouse moves off the label I want it to change back to the original color. If anyone knows how to do this I would appreciate the help. I did find some code that does this with VB6 but its to large and confusing plus its for the Web and not for an exe program.

    Please help

    Troy

    ------------------
    Troy MacPherson
    Customer Suport Software Analyst
    [email protected]



  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Post

    Try this
    Code:
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Label1.BackColor = vbBlue 'change VbBlue to your color
    End Sub
    
    Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        Label1.BackColor = vbRed 'change VbRed to your color
    End Sub
    Should work

    ------------------
    Visual Basic Programmer (at least I want to be one)
    ------------------
    PolComSoft
    You will hear a lot about it.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width