コード例 #1
0
        private void InitForm()
        {
            if (isBorderless && !IsDesignMode)
            {
                formNCAreaDecorator = new FormNCAreaDecorator(this);
                formShadowDecorator = new FormShadowDecorator(this);
            }

            BackColor = Color.White;
        }
コード例 #2
0
ファイル: BorderlessForm.cs プロジェクト: xiaoyanse/NanUI
        private void InitForm()
        {
            //SetStyle(ControlStyles.ResizeRedraw, true);
            //SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            //SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            //DoubleBuffered = true;

            if (isBorderless && !IsDesignMode)
            {
                formNCAreaDecorator = new FormNCAreaDecorator(this);
                formShadowDecorator = new FormShadowDecorator(this, false);
            }

            BackColor = Color.White;
        }
コード例 #3
0
        internal FormShadowElement(FormShadowDockPositon side, IntPtr parent, FormShadowDecorator decorator)
        {
            _side         = side;
            _parentHandle = parent;
            _decorator    = decorator;

            _blend = new BLENDFUNCTION
            {
                BlendOp             = AcSrcOver,
                BlendFlags          = 0,
                SourceConstantAlpha = 255,
                AlphaFormat         = AcSrcAlpha
            };

            InitializeAlphas();
            InitializeColors();

            CreateWindow($"{CONSTS.CLASS_NAME}_{side}_{parent}");
        }