protected bool BeginDrag() { if (DragControl == null) { return(false); } StartMousePosition = MousePosition; if (!Win32Helper.IsRunningOnMono) { if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition)) { return(false); } } var form = DragControl.FindForm(); if (form != null) { form.Capture = true; } var findForm = DragControl.FindForm(); if (findForm != null) { AssignHandle(findForm.Handle); } Application.AddMessageFilter(this); return(true); }
protected bool BeginDrag() { if (DragControl == null) { return(false); } StartMousePosition = Control.MousePosition; if (!Win32Helper.IsRunningOnMono) { if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition)) { return(false); } } DragControl.FindForm().Capture = true; AssignHandle(DragControl.FindForm().Handle); if (PatchController.EnableActiveXFix == false) { Application.AddMessageFilter(this); } return(true); }
private void EndDrag(bool abort) { ReleaseHandle(); Application.RemoveMessageFilter(this); DragControl.FindForm().Capture = false; OnEndDrag(abort); }
protected bool BeginDrag() { // Avoid re-entrance; lock (this) { if (DragControl == null) { return(false); } StartMousePosition = Control.MousePosition; if (!Win32Helper.IsRunningOnMono) { if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition)) { return(false); } } DragControl.FindForm().Capture = true; AssignHandle(DragControl.FindForm().Handle); Application.AddMessageFilter(this); return(true); } }
private void EndDrag(bool abort) { ReleaseHandle(); if (PatchController.EnableActiveXFix == false) { Application.RemoveMessageFilter(this); } DragControl.FindForm().Capture = false; OnEndDrag(abort); }
private void EndDrag(bool abort) { ReleaseHandle(); Application.RemoveMessageFilter(this); var findForm = DragControl.FindForm(); if (findForm != null) { findForm.Capture = false; } OnEndDrag(abort); }
protected bool BeginDrag() { // Avoid re-entrance; lock (this) { if (DragControl == null) return false; StartMousePosition = Control.MousePosition; if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition)) return false; DragControl.FindForm().Capture = true; AssignHandle(DragControl.FindForm().Handle); Application.AddMessageFilter(this); return true; } }
protected bool BeginDrag() { lock (this) { if (DragControl == null) { return(false); } StartMousePosition = Control.MousePosition; if (!NativeMethods.DragDetect(DragControl.Handle, StartMousePosition)) { return(false); } DragControl.FindForm().Capture = true; AssignHandle(DragControl.FindForm().Handle); Application.AddMessageFilter(this); return(true); } }