protected virtual void OnPaintBackground(PaintEventArgs e) { if(BackColor == null) BackColor = Color.Transparent; if(BackColor == Color.Transparent) return; Pen pen = new Pen(BackColor); e.Graphics.DrawRectangle(pen,e.ClipRectangle); }