void HookManager_MouseMove(object sender, MouseEventArgs e) { if (isXMove) { WinApi.SetWindowPosFlags swp = WinApi.SetWindowPosFlags.AsynchronousWindowPosition | WinApi.SetWindowPosFlags.IgnoreResize | WinApi.SetWindowPosFlags.IgnoreZOrder | WinApi.SetWindowPosFlags.DoNotActivate; WinApi.SetWindowPos(hWndMoveWindow, IntPtr.Zero, e.X - offsetMoveWindow.X, e.Y - offsetMoveWindow.Y, 0, 0, swp); } }