BackColor on MDI container

B

Bergsvein Vollan

I have a form with a certain BackColor. I'd like it to be
an MDIContainer but as soon as I set the IsMDIContainer
property to true my BackColor becomes gray.

Isnt it possible to have an MDIContainer with a colored
background?

Bergsvein Vollan
 
P

Paul E Collins

Bergsvein Vollan said:
I have a form with a certain BackColor. I'd like it
to be an MDIContainer but as soon as I set the
IsMDIContainer property to true my BackColor
becomes gray.
Isnt it possible to have an MDIContainer with a
colored background?

You need to set the background of the MdiClient, not the MdiContainer.

foreach (Control ctl in this.Controls)
{
if (ctl.GetType() == typeof(MdiClient))
{
ctl.BackColor = Color.Blue;
}
}

P.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top