コード例 #1
0
        protected override void OnMouseMove(MouseEventArgs e)
        {
            base.OnMouseMove(e);

            bool bNewHoverOverClose = CloseButtonRectangle.Contains(e.Location);

            if (bHoverOverClose != bNewHoverOverClose)
            {
                bHoverOverClose = bNewHoverOverClose;
                Invalidate();
            }
        }
コード例 #2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            bSplitterMoved = false;

            if (CloseButtonRectangle.Contains(e.Location))
            {
                bMouseDownOverClose = bHoverOverClose;
            }
            else
            {
                base.OnMouseDown(e);
            }
        }