protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); /* the real border is painted outside of control so only attmpt paint if real border is not present */ if (BorderStyle.Equals(BorderStyle.None) && (Text.Length > 0)) { ControlPaint.DrawBorder(e.Graphics, DisplayRectangle, border_color, ButtonBorderStyle.Solid); } }