protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            Bitmap   B = new Bitmap(Width, Height);
            Graphics G = Graphics.FromImage(B);

            base.OnPaint(e);

            G.SmoothingMode = SmoothingMode.HighQuality;

            G.Clear(BackColor);

            LinearGradientBrush bg0 = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);

            G.FillPath(bg0, Draw.RoundRect(bgr, 10));

            LinearGradientBrush lgb10 = new LinearGradientBrush(MinBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);

            G.FillEllipse(lgb10, MinBtn);
            G.DrawEllipse(Pens.DimGray, MinBtn);
            G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

            LinearGradientBrush lgb20 = new LinearGradientBrush(MaxBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);

            G.FillEllipse(lgb20, MaxBtn);
            G.DrawEllipse(Pens.DimGray, MaxBtn);
            G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

            LinearGradientBrush lgb30 = new LinearGradientBrush(CloseBtn, Color.FromArgb(247, 150, 116), Color.FromArgb(223, 81, 6), 90);

            G.FillEllipse(lgb30, CloseBtn);
            G.DrawEllipse(Pens.DimGray, CloseBtn);
            G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));

            switch (State)
            {
            case MouseState.None:
                LinearGradientBrush bg = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);
                G.FillPath(bg, Draw.RoundRect(bgr, 10));

                LinearGradientBrush lgb1 = new LinearGradientBrush(MinBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                G.FillEllipse(lgb1, MinBtn);
                G.DrawEllipse(Pens.DimGray, MinBtn);
                G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

                LinearGradientBrush lgb2 = new LinearGradientBrush(MaxBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                G.FillEllipse(lgb2, MaxBtn);
                G.DrawEllipse(Pens.DimGray, MaxBtn);
                G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

                LinearGradientBrush lgb3 = new LinearGradientBrush(CloseBtn, Color.FromArgb(247, 150, 116), Color.FromArgb(223, 81, 6), 90);
                G.FillEllipse(lgb3, CloseBtn);
                G.DrawEllipse(Pens.DimGray, CloseBtn);
                G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));
                break;

            case MouseState.Over:
                if (X > 3 && X < 20)
                {
                    LinearGradientBrush bg1 = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);
                    G.FillPath(bg1, Draw.RoundRect(bgr, 10));

                    LinearGradientBrush lgb11 = new LinearGradientBrush(MinBtn, Color.FromArgb(172, 171, 166), Color.FromArgb(76, 75, 71), 90);
                    G.FillEllipse(lgb11, MinBtn);
                    G.DrawEllipse(Pens.DimGray, MinBtn);
                    G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

                    LinearGradientBrush lgb21 = new LinearGradientBrush(MaxBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                    G.FillEllipse(lgb21, MaxBtn);
                    G.DrawEllipse(Pens.DimGray, MaxBtn);
                    G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

                    LinearGradientBrush lgb31 = new LinearGradientBrush(CloseBtn, Color.FromArgb(247, 150, 116), Color.FromArgb(223, 81, 6), 90);
                    G.FillEllipse(lgb31, CloseBtn);
                    G.DrawEllipse(Pens.DimGray, CloseBtn);
                    G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));
                }
                else if (X > 23 && X < 40)
                {
                    LinearGradientBrush bg3 = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);
                    G.FillPath(bg3, Draw.RoundRect(bgr, 10));

                    LinearGradientBrush lgb13 = new LinearGradientBrush(MinBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                    G.FillEllipse(lgb13, MinBtn);
                    G.DrawEllipse(Pens.DimGray, MinBtn);
                    G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

                    LinearGradientBrush lgb23 = new LinearGradientBrush(MaxBtn, Color.FromArgb(172, 171, 166), Color.FromArgb(76, 75, 71), 90);
                    G.FillEllipse(lgb23, MaxBtn);
                    G.DrawEllipse(Pens.DimGray, MaxBtn);
                    G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

                    LinearGradientBrush lgb33 = new LinearGradientBrush(CloseBtn, Color.FromArgb(247, 150, 116), Color.FromArgb(223, 81, 6), 90);
                    G.FillEllipse(lgb33, CloseBtn);
                    G.DrawEllipse(Pens.DimGray, CloseBtn);
                    G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));
                }
                else if (X > 43 && X < 60)
                {
                    LinearGradientBrush bg3 = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);
                    G.FillPath(bg3, Draw.RoundRect(bgr, 10));

                    LinearGradientBrush lgb13 = new LinearGradientBrush(MinBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                    G.FillEllipse(lgb13, MinBtn);
                    G.DrawEllipse(Pens.DimGray, MinBtn);
                    G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

                    LinearGradientBrush lgb23 = new LinearGradientBrush(MaxBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                    G.FillEllipse(lgb23, MaxBtn);
                    G.DrawEllipse(Pens.DimGray, MaxBtn);
                    G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

                    LinearGradientBrush lgb33 = new LinearGradientBrush(CloseBtn, Color.FromArgb(255, 170, 136), Color.FromArgb(243, 101, 26), 90);
                    G.FillEllipse(lgb33, CloseBtn);
                    G.DrawEllipse(Pens.DimGray, CloseBtn);
                    G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));
                }
                break;

            default:
                LinearGradientBrush bg4 = new LinearGradientBrush(bgr, Color.FromArgb(60, 59, 55), Color.FromArgb(60, 59, 55), 90);
                G.FillPath(bg4, Draw.RoundRect(bgr, 10));

                LinearGradientBrush lgb14 = new LinearGradientBrush(MinBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                G.FillEllipse(lgb14, MinBtn);
                G.DrawEllipse(Pens.DimGray, MinBtn);
                G.DrawString("0", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle((int)5.5, 6, 0, 0));

                LinearGradientBrush lgb24 = new LinearGradientBrush(MaxBtn, Color.FromArgb(152, 151, 146), Color.FromArgb(56, 55, 51), 90);
                G.FillEllipse(lgb24, MaxBtn);
                G.DrawEllipse(Pens.DimGray, MaxBtn);
                G.DrawString("1", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(26, 7, 0, 0));

                LinearGradientBrush lgb34 = new LinearGradientBrush(CloseBtn, Color.FromArgb(247, 150, 116), Color.FromArgb(223, 81, 6), 90);
                G.FillEllipse(lgb34, CloseBtn);
                G.DrawEllipse(Pens.DimGray, CloseBtn);
                G.DrawString("r", Font, new SolidBrush(Color.FromArgb(58, 57, 53)), new Rectangle(46, 7, 0, 0));
                break;
            }


            e.Graphics.DrawImage((Bitmap)B.Clone(), 0, 0);
            G.Dispose();
            B.Dispose();
        }