diff --git a/SunnyUI/Forms/UIForm2.cs b/SunnyUI/Forms/UIForm2.cs index b000f2da..cb46b8b2 100644 --- a/SunnyUI/Forms/UIForm2.cs +++ b/SunnyUI/Forms/UIForm2.cs @@ -706,6 +706,7 @@ namespace Sunny.UI } } + private DateTime lastMouseDownTime; /// /// 重载鼠标按下事件 /// @@ -720,6 +721,13 @@ namespace Sunny.UI if (e.X > ControlBoxLeft) return; if (!Movable) return; + if (DateTime.Now - lastMouseDownTime <= TimeSpan.FromMilliseconds(500)) + { + lastMouseDownTime = DateTime.Now; + return; + } + + lastMouseDownTime = DateTime.Now; Win32.User.ReleaseCapture(); Win32.User.SendMessage(this.Handle, Win32.User.WM_SYSCOMMAND, Win32.User.SC_MOVE + Win32.User.HTCAPTION, 0); }