Exemplo n.º 1
0
        void FakeScrollBar_MouseDown()
        {
            IsMouseDown = true;
            Point pt = Form.MousePosition;

            pt = vsbBase.PointToClient(pt);
            MouseDownLocation = pt;

            if (TopButtonRect.Contains(pt))
            {
                MouseDownIndex = 0;
            }
            else if (TopBlankRect.Contains(pt))
            {
                MouseDownIndex = 1;
            }
            else if (ScrollButtonRect.Contains(pt))
            {
                MouseDownIndex = 2;
            }
            else if (BottomBlankRect.Contains(pt))
            {
                MouseDownIndex = 3;
            }
            else if (BottomButtonRect.Contains(pt))
            {
                MouseDownIndex = 4;
            }

            if (TopButtonRect.Contains(pt) || BottomButtonRect.Contains(pt) || ScrollButtonRect.Contains(pt))
            {
                DrawScrollbar();
            }
        }