开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜