Пример #1
0
        public formProgressOverlay(formProgressOverlay background)
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            this.Opacity         = 0.95;
            this.TransparencyKey = this.BackColor = Color.Magenta;
            this.ShowInTaskbar   = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.StartPosition   = FormStartPosition.Manual;

            progress = new FlatProgressBar()
            {
                Anchor    = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top,
                Bounds    = this.ClientRectangle,
                ForeColor = Color.LimeGreen,
                Animated  = true,
            };

            this.Controls.Add(progress);
        }
Пример #2
0
        public formProgressOverlay()
        {
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.Opaque, true);

            this.Opacity         = 0.75;
            this.BackColor       = Color.Black;
            this.ShowInTaskbar   = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.StartPosition   = FormStartPosition.Manual;

            this.Paint += background_Paint;

            foreground       = new formProgressOverlay(this);
            foreground.Owner = this;

            progress = foreground.progress;

            this.MinimumSizeChanged += background_MinimumSizeChanged;
            this.MaximumSizeChanged += background_MaximumSizeChanged;

            this.Size = new Size(200, 7);
        }