Mouse Enter & Mouse leaver event Help

visualstudio , net , csharp Colombo, Sri Lanka
  • 9 years ago

    i used mouse enter event for set opacity=1 and mouse leaver event for set opacity=0.5 but when i used mouse enter event and mouse leaver event on my form it only works on particular form it does not work for button and lable for the same form please help me...

  • 9 years ago
    Public Class Form1
        Private Sub Form1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseEnter
            Opacity = 1
        End Sub
    
        Private Sub Form1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.MouseLeave
            Opacity = 0.5
        End Sub
    End Class
    

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Some people, when confronted with a problem, think "I know, I’ll use regular expressions." Now they have two problems.” - Jamie Zawinski