.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh
Melody Anderson
Eminent IT

Post New Resource Bookmark and Share   

Background color for MDI in C#.net

Posted By:Narayanan       Posted Date: February 14, 2012    Points: 40    Category:    URL: http://www.dotnetspark.com  

Background Color for Multiple Document Interface form in C#.net

   MdiClient ctlMDI;
            // Loop through all of the form's controls looking
            // for the control of type MdiClient.
            foreach (Control ctl in this.Controls)
                    // Attempt to cast the control to type MdiClient.
                    ctlMDI = (MdiClient)ctl;
                    // Set the BackColor of the MdiClient control.
                    ctlMDI.BackColor = Color.Yellow;
                catch (InvalidCastException exc)
                    // Catch and ignore the error if casting failed.


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend