Live Chat Icon For mobile
Live Chat Icon

How can I change the background of my MDI Client container?

Platform: WinForms| Category: MDI

The default behavior is to make the client container use the Control color from the Control panel. You can change this behavior by making the
MDI Client container use the form’s BackColor and Image. To do this, after the call to InitializeComponents(), add the code below. You can
also download a working MDI Client project that has this code in it.

//set back color
foreach(Control c in this.Controls)
{
  if(c is MdiClient)
  {
    c.BackColor = this.BackColor;
    c.BackgroundImage = this.BackgroundImage;
  }
}

Share with

Share on twitter
Share on facebook
Share on linkedin