protected override void OnPaint(PaintEventArgs e)
{
// We must always paint the entire area of the tab control
/// The comments are a workaround fix for screen freeze when a tab control is partially off-screen
//if (e.ClipRectangle.Equals(this.ClientRectangle)){
this.CustomPaint(e.Graphics);
/*
} else {
// it is less intensive to just reinvoke the paint with the whole surface available to draw on.
this.Invalidate();
}
*/
}