Tell me how can I define a mouse event inside the procedure?

Private Sub NavItem_Event(sender As Object, e As MouseEventArgs) _ Handles _ Label2.MouseEnter, Label2.MouseLeave, Label2.Click, Label3.MouseEnter, Label3.MouseLeave, Label3.Click End Sub 

I see it like this:

 Select Case e.MouseEvent Case : "MouseEnter" sender.someProperty = newValue Case : "MouseLeave" sender.someProperty = prevValue End Select 

I want to say so within a procedure to kill a flock of hares.

UPD:

Perhaps some sort of user32.dll will help?

  • You must have one handler procedure, and it must be connected to two different events: MouseEnter and MouseLeave - Stack
  • I am aware of this, it is just wondering whether it is possible to organize this action. Just learning the language and in fact the technical documentation will not tell me what I am right about and what is not. Perhaps some sort of user32.dll will help, etc. - Tatatrin

0