public override bool DoMouseMove(Point p, MouseButtons button) { // If we're resizing or moving, do whatever we need to do. if (doMouseMoveRM(p)) { return(true); } // Got capture? if (ctrlCapturingMouse != null) { // Transform to control's coordinates Point pCtrl = new Point(p.X - ctrlCapturingMouse.AbsLeft, p.Y - ctrlCapturingMouse.AbsTop); ctrlCapturingMouse.DoMouseMove(pCtrl, button); return(true); } // Over a control of ours? If yes, we're done. if (base.DoMouseMove(p, button)) { form.Cursor = desiredCursor; return(true); } // Update cursor over resize/move hot areas doMouseMoveRMCursor(p); return(true); }
public virtual bool DoMouseMove(Point p, MouseButtons button) { bool res = false; ZenControlBase ctrl = GetControl(p); if (ctrl != null) { if (ctrlWithMouse != ctrl) { if (ctrlWithMouse != null) { ctrlWithMouse.DoMouseLeave(); } ctrl.DoMouseEnter(); ctrlWithMouse = ctrl; } ctrl.DoMouseMove(parentToControl(ctrl, p), button); res = true; } else if (ctrlWithMouse != null) { ctrlWithMouse.DoMouseLeave(); ctrlWithMouse = null; } return(res); }