Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

I'm trying to set the Client Area of the MDI form, I'm trying with Baclcolor of the form, but doesn't works :( it changes the controls backcolor, not Client Area. How I can do this ?

 

Thanks !

Mikecrosoft.Net
  • Leaders
Posted

in vb.net you can do this .....

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 ....

		MdiClient mdi = null;
		foreach(Control ctl in Controls)
		{
			if(ctl is MdiClient)
			{
				mdi=(MdiClient)ctl;
				mdi.BackColor=Color.SkyBlue;
			}
		}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...