protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); bool bNewHoverOverClose = CloseButtonRectangle.Contains(e.Location); if (bHoverOverClose != bNewHoverOverClose) { bHoverOverClose = bNewHoverOverClose; Invalidate(); } }
protected override void OnMouseDown(MouseEventArgs e) { bSplitterMoved = false; if (CloseButtonRectangle.Contains(e.Location)) { bMouseDownOverClose = bHoverOverClose; } else { base.OnMouseDown(e); } }