MDI Form BackColor (Client Area)

Loop through all the controls on your form until you find the instance of MdiClient. Then you can change its backcolor directly.
 
in vb.net you can do this .....
Code:
Dim ctl As Control
Dim mdi As MdiClient
    For Each ctl In Controls
        If TypeOf ctl Is MdiClient Then
            mdi = DirectCast(ctl, MdiClient) /// cast mdi as the Control.
            mdi.BackColor = Color.Red
        End If
    Next
in C# you can do it like this ....
C#:
			MdiClient mdi = null;
			foreach(Control ctl in Controls)
			{
				if(ctl is MdiClient)
				{
					mdi=(MdiClient)ctl;
					mdi.BackColor=Color.SkyBlue;
				}
			}
 
Back
Top