all groups > dotnet windows forms > april 2005 >
You're in the

dotnet windows forms

group:

MDI Container


MDI Container ZS
4/28/2005 4:06:03 PM
dotnet windows forms:
Hi All,
In C# when I change the isMDIContainer property of a Form to true, the
background color of the Form changes to a default color set by Visual Stuidio
(a dark grey) . Is there a way I can change this color to something of my
choice. If so how? Changing the background of the Form does not work when
the IsMDIContainer is set to true.
Please assist.
-ZS
Re: MDI Container Mick Doherty
4/29/2005 12:00:00 AM
The MDIClient is a private control on the form, but it is accessible.

foreach (Control c In this.Controls)
if (c is MdiClient)
c.BackColor = Color.Green;

but if you want to paint to it then I would reccomend setting a
BackgroundImage to the form and painting that instead.
The MdiClient is private and notInheritable.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


[quoted text, click to view]

AddThis Social Bookmark Button