C
Colin McGuire
Hi again NG, this question follows from a similar question that I have
thought through a bit more, and the next problem I encountered
Here is the issue clearly: if I have form1 with a button on it, and in my
form1 source-code I put the following code
Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
Debug.WriteLine("OnMouseLeave")
MyBase.OnMouseLeave(e)
End Sub
then as I move my mouse cursor over the button, the VS IDE output/debug
window displays "OnMouseLeave". Also as I move the mouse cursor off the
form (over something else, possibly not even one of my applications), the
output/debug window also displays "OnMouseLeave".
What I am wanting to do is hide the form if the mouse cursor moves off it
(but not to one of the controls on the form).
My question is how on earth can this be achieved given that the MouseLeave
event is fired for both situations (I want to execute Me.Hide() only when
the mouse really moves off the form, not when it moves onto some of the
controls on the form). There is another event I should be overriding rather
than OnMouseLeave?
Colin
thought through a bit more, and the next problem I encountered
Here is the issue clearly: if I have form1 with a button on it, and in my
form1 source-code I put the following code
Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
Debug.WriteLine("OnMouseLeave")
MyBase.OnMouseLeave(e)
End Sub
then as I move my mouse cursor over the button, the VS IDE output/debug
window displays "OnMouseLeave". Also as I move the mouse cursor off the
form (over something else, possibly not even one of my applications), the
output/debug window also displays "OnMouseLeave".
What I am wanting to do is hide the form if the mouse cursor moves off it
(but not to one of the controls on the form).
My question is how on earth can this be achieved given that the MouseLeave
event is fired for both situations (I want to execute Me.Hide() only when
the mouse really moves off the form, not when it moves onto some of the
controls on the form). There is another event I should be overriding rather
than OnMouseLeave?
Colin