Exemplo n.º 1
0
        protected override void OnSetCursor(  )
        {
            // Get mouse cursor position relative to
            // the control's coordinate space.

            BaseLineItem label = (BaseLineItem)Control;
            Point        p     = label.PointToClient(Cursor.Position);

            // Display a resize cursor if the mouse is
            // over a grab handle; otherwise show a
            // normal arrow.
            if (GetHandle(label.FromPoint).Contains(p) ||
                GetHandle(label.ToPoint).Contains(p))
            {
                Cursor.Current = Cursors.SizeAll;
            }
            else
            {
                Cursor.Current = Cursors.Default;
            }
        }