VB .NET: using onMouseLeave on form
Posted on 2004-11-01
I'm creating a form that expands, and when the user moves the mouse off the expanded form, I want to trigger the resize to normal. It also seems that if the mouse enters a control on the form it triggers the form's onMouseleave event.
I am setting the size by: me.height = 100
But the onMouseleave event seems to fire when the mouse moves onto a control, or moves past the OLD size of the form.
How can I get the onMouseleave event not to fire if i move into a control it owns, and to use the form's new size when calculating if the user has moved the mouse out of it?
Is this a good approach: when the form's onMouseLeave event is triggered determine if the mouse is in the border of the form? How would I do that?