I have a form with a lot of controls on it. How can I detect when the mouse leaves the form? I\'ve tried wiring up a MouseLeave event for every single control and the form
If PointToClient(MousePosition).X < Me.Size.Width AndAlso PointToClient(MousePosition).X > -1 AndAlso PointToClient(MousePosition).Y < Me.Size.Height AndAlso PointToClient(MousePosition).Y > -1 Then
'Mouse is inside the form
Else
'Mouse is outside of form
End If