chage colour of label when user lost focus over label

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • muddasirmunir
    Contributor
    • Jan 2007
    • 284

    #1

    chage colour of label when user lost focus over label

    I am using the following code at mouse move event of label

    Private Sub label1_MouseMov e(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Lable1.ForeColo r = &HE2926B
    End Sub
    Now i want that when user lost focus from the label its color aging change back , on what event i want to do this code as there is no event like lost focus on label. OR
    how i can detect that the user moves its cursor outside label.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you need to check X & Y coordinates of the mouse pointer an dfindout if it is over the mose or not.

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      Write Label1.ForeColo r =vbWhite in Mouse_Move of the Form..
      (If Mouse is not over Label, Form's Mouse Move is triggerred..)

      Regards
      Veena

      Comment

      • muddasirmunir
        Contributor
        • Jan 2007
        • 284

        #4
        Thank veena its worked with form_mousemove.

        Comment

        Working...