protected override TrackerHit HitTestHandles(System.Drawing.Point point) { TrackerHit hit = base.HitTestHandles(point); switch (hit) { case TrackerHit.hitTopLeft: case TrackerHit.hitTop: case TrackerHit.hitLeft: case TrackerHit.hitTopRight: case TrackerHit.hitBottomLeft: case TrackerHit.hitMiddle: hit = TrackerHit.hitNothing; break; default: break; } return(hit); }
public virtual TrackerHit HitTest(Point point) { TrackerHit hitResult = TrackerHit.hitNothing; Rectangle rectTrue = new Rectangle(); GetTrueRect(ref rectTrue); Debug.Assert(rectTrue.Left <= rectTrue.Right); Debug.Assert(rectTrue.Top <= rectTrue.Bottom); if (rectTrue.Contains(point)) { if ((m_nStyle & (StyleFlags.resizeInside | StyleFlags.resizeOutside)) != 0) { hitResult = HitTestHandles(point); } else { hitResult = TrackerHit.hitMiddle; } } return(hitResult); }