S
Sam
Hi,
I can't figure out how to detect when my mouse cursor leaves a panel
control. It should not trigger the event (or do anything) when the
mouse leave the panel but still is over a control that is contained by
the panel.
I've done this :
Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
If Cursor.Position.X > Me.Location.X + Me.Width Or
Cursor.Position.Y > Me.Location.Y + Me.Height _
Or Cursor.Position.X < Me.Location.X Or Cursor.Position.Y <
Me.Location.Y Then
MsgBox("Out")
End If
End Sub
That doesn't work well. what is the correct method ?
Thx
I can't figure out how to detect when my mouse cursor leaves a panel
control. It should not trigger the event (or do anything) when the
mouse leave the panel but still is over a control that is contained by
the panel.
I've done this :
Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
If Cursor.Position.X > Me.Location.X + Me.Width Or
Cursor.Position.Y > Me.Location.Y + Me.Height _
Or Cursor.Position.X < Me.Location.X Or Cursor.Position.Y <
Me.Location.Y Then
MsgBox("Out")
End If
End Sub
That doesn't work well. what is the correct method ?
Thx