Maybe you have a hypersensitive mouse which responds to whiffs of cheese in the vicinity
. One thing you might like to try is to check if the mouse has moved more than a certain distance, say 2 pixels, since the previous mouse move. Here's how you could code it the MouseMove event:
Code:
Static lastPosition As Point = MousePosition
If Math.Abs(MousePosition.X - lastPosition.X) > 1 _
OrElse Math.Abs(MousePosition.Y - lastPosition.Y) > 1 Then
Me.Close()
End If
lastPosition = MousePosition
You probably won't need the FirstTime variable if you do that.
BB