protected override void OnPaint(PaintEventArgs e)
{
Bitmap bitmap = new Bitmap(Width, Height);
Graphics graphics = Graphics.FromImage(bitmap);
W = Width;
H = Height;
Rectangle rect = new Rectangle(0, 0, W, H);
Rectangle rect2 = new Rectangle(0, 0, W, 50);
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
graphics.Clear(BackColor);
graphics.FillRectangle(new SolidBrush(_BaseColor), rect);
graphics.FillRectangle(new SolidBrush(_HeaderColor), rect2);
graphics.FillRectangle(new SolidBrush(Color.FromArgb(243, 243, 243)),
new Rectangle(13, 16, 4, 18));
graphics.DrawString(Text,
Font,
new SolidBrush(TextColor),
new Rectangle(26, 15, W, H),
Helpers.NearSF);
graphics.DrawRectangle(new Pen(_BorderColor), rect);
OnPaint(e);
graphics.Dispose();
e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
bitmap.Dispose();
}