Mikecrosoft Posted December 3, 2003 Posted December 3, 2003 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 ! Quote Mikecrosoft.Net
*Gurus* divil Posted December 4, 2003 *Gurus* Posted December 4, 2003 Loop through all the controls on your form until you find the instance of MdiClient. Then you can change its backcolor directly. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Leaders dynamic_sysop Posted December 6, 2003 Leaders Posted December 6, 2003 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; } } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.