表单边框的事件?
我想知道用户何时将鼠标悬停在表单边框上。我还想知道它是顶部/底部还是左/右边框。 似乎没有任何与此相关的事件。我尝试过在表单上使用 MouseMove,但只有当它位于表单“内部”时才会触发。
我尝试查看 Bounds 属性,但没有任何事件。 我可以做什么来解决这个问题?
I want to know when the user has the mouse over the border of a form. I also want to be able to know if its the top/bottom or left/right border.
There does not seem to be any events for this. I have tried using MouseMove on the form but it only fires when it is "inside" the form.
I have tried looking at the Bounds property but that does not have any events.
What can I do to solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须重写 WNDPROC 方法并查找 WM_NC* 消息。
此链接应该可以帮助您入门:来自控件非客户区的鼠标事件
You have to override the WNDPROC method and look for WM_NC* messages.
This link should get you started: Mouse events from a non-client area of a control