public CustomTabControl()
{
if (System.Diagnostics.Process.GetCurrentProcess().ProcessName != "devenv")
{
this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque | ControlStyles.ResizeRedraw, true);
}
else
{
this.SetStyle(ControlStyles.UserPaint | ControlStyles.Opaque | ControlStyles.ResizeRedraw, true);
}
this._BackBuffer = new Bitmap(this.Width, this.Height);
this._BackBufferGraphics = Graphics.FromImage(this._BackBuffer);
this._TabBuffer = new Bitmap(this.Width, this.Height);
this._TabBufferGraphics = Graphics.FromImage(this._TabBuffer);
this.DisplayStyle = TabStyle.Default;
}