MouseLeave not firing if a WinForm has only one full-docked ListBox
I have a Form with only a simple listbox. The listbox is Full-docked and the Form's FormBorderStyle is set to None.
When I attach a MouseLeave event to a form, it does not fire. (It also does not fire MouseMove, MouseHover etc.)
However, if I undock the listbox and resize it so at least a part of the form is visible and if I move mouse over the visible part of the form, all mouse events fire again.
How to get the form to receive mouse events even if it's consisted only of a full-docke开发者_StackOverflowd listbox?
Thanks
It shouldnt fire bacause your mouse didnt enter to form on, it enters on listbox. So you should use MouseLeave event in listbox control
I don't think it is possible. Because the control will handle the events it won't be bypassed to Form.
精彩评论