protected bool BeginDrag()
{
// Avoid re-entrance;
lock (this)
{
if (this.DragControl == null)
return false;
this.StartMousePosition = MousePosition;
if (!NativeMethods.DragDetect(this.DragControl.Handle, this.StartMousePosition))
return false;
this.DragControl.FindForm().Capture = true;
AssignHandle(this.DragControl.FindForm().Handle);
Application.AddMessageFilter(this);
return true;
}
}