AIMS.Libraries.Forms.Docking.User32.DragDetect C# (CSharp) Method

DragDetect() private method

private DragDetect ( IntPtr hWnd, Point pt ) : bool
hWnd IntPtr
pt Point
return bool
        public static extern bool DragDetect(IntPtr hWnd, Point pt);

Usage Example

Ejemplo n.º 1
0
        protected bool BeginDrag(Control c)
        {
            // Avoid re-entrance;
            lock (this)
            {
                if (m_dragControl != null)
                {
                    return(false);
                }

                m_startMousePosition = Control.MousePosition;

                if (!User32.DragDetect(c.Handle, StartMousePosition))
                {
                    return(false);
                }

                m_dragControl = c;
                c.FindForm().Capture = true;
                AssignHandle(c.FindForm().Handle);
                Application.AddMessageFilter(this);
                return(true);
            }
        }