private void DrawBackgroundFix( Graphics g, ref Rectangle tabArea )
{
//--------------------------------------------------//
//--- draw background to cover flat border areas ---//
//--------------------------------------------------//
if (SelectedTab != null)
{
TabPage tabPage = SelectedTab;
Color color = tabPage.BackColor;
using (var border = new Pen( color ))
{
tabArea.Offset( 1, 1 );
tabArea.Width -= 2;
tabArea.Height -= 2;
g.DrawRectangle( border, tabArea );
tabArea.Width -= 1;
tabArea.Height -= 1;
g.DrawRectangle( border, tabArea );
border.Dispose();
}
}
}