Exemple #1
0
        private void CreateSecondMark(int scrollBarWid)
        {
            int          w = scrollBarWid - 1;
            int          h = scrollBarWid - 2;
            UnsafeBitmap b = new UnsafeBitmap(w, h);

            b.LockBitmap();
            FormUtil.FillShadedRectangle(b, w, h);
            UnsafeBitmap bh = b.Lighter();
            UnsafeBitmap bp = b.Darker();

            b.UnlockBitmap();
            bh.UnlockBitmap();
            bp.UnlockBitmap();
            secondMark = b.Bitmap;
            secondMark.MakeTransparent();
            secondMarkHighlight = bh.Bitmap;
            secondMarkHighlight.MakeTransparent();
            secondMarkPress = bp.Bitmap;
            secondMarkPress.MakeTransparent();
        }
Exemple #2
0
        private void CreateBar(int scrollBarWid, int width)
        {
            int          w = CalcBarSize(width);
            int          h = scrollBarWid - 2;
            UnsafeBitmap b = new UnsafeBitmap(w, h);

            b.LockBitmap();
            FormUtil.FillShadedRectangle(b, w, h);
            UnsafeBitmap bh = b.Lighter();
            UnsafeBitmap bp = b.Darker();

            b.UnlockBitmap();
            bh.UnlockBitmap();
            bp.UnlockBitmap();
            bar = b.Bitmap;
            bar.MakeTransparent();
            barHighlight = bh.Bitmap;
            barHighlight.MakeTransparent();
            barPress = bp.Bitmap;
            barPress.MakeTransparent();
        }