I have a form and some controls inside it.
I want to fire an event when user enter the form and when he leaves the form .
this.MouseEnter += (sender, e) =>
this.MouseLeave += (sender, e) =>
the problem with that is when I move mouse over the child control, form's mouseleave event is triggered.
I don't want this to happen (even if the mouse over control is still over the form).
How to solve that?
I don't want to set any events on the children (because there are many controls and some of them create dynamically).
I also don't want to use any timers to check the position....
I know I can use IMessageFilter, and add to application:
public bool PreFilterMessage(ref Message m)
if (m.Msg == 0x2a1)
But this will fire for entire application and not just for one form, and I don;t know how to detect inside PreFilterMessage the current control.
View Complete Post