In my VB.Net forms application, I have a function:
Private Sub pnlMain_MouseLeave(sender As Object, e As System.EventArgs) Handles pnlMain.MouseLeave
...
End Sub
and another function:
Private Sub pnlMain_MouseEnter(sender As Object, e As System.EventArgs) Handles pnlMain.MouseEnter
...
End Sub
When the mouse enters or leaves both are executed - first Enter and then Leave. Why is this happening?