Winform 对话框:检测移动的开始和结束
我想检测 winform 何时开始被拖动以及何时停止。
原因很简单:我想提供一个 Ctrl+Z 功能,将窗口设置回其原始位置,并且我显然需要存储移动开始和结束的时间
是否有可能做到这一点?
更新1: 我找到了如何检测停止拖动: C# 表单移动停止事件
我想立即检测开始拖动
I would like to detect when a winform starts being dragged and when this stops.
The reason is quite easy: I would like to offer a Ctrl+Z function that sets the window back to its original position, and I need obviusly to store when move starts and ends
Are there any possibilities to do this?
Update 1:
I found how to detect stop dragging:
C# Form Move Stopped Event
I would like to detect START dragging now
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您的链接文章中提到的:
Form.ResizeBegin 和 Form.ResizeEnd 事件处理您的内容想。
As mentioned in your linked article:
Form.ResizeBegin and Form.ResizeEnd events handle what you want.