That's because you cannot see the background of the form because it is obscured by an MdiClient control. That's the grey area that you can see and what actually hosts the child forms. You are not supposed to access it directly so there is no member variable created. To get a reference to it you simply need to iterate over the Controls collection of the form until you find one that is an MdiClient.Code:public partial class Form1 : Form { private MdiClient childHost; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { foreach (Control ctl in this.Controls) { if (ctl.GetType() == typeof(MdiClient)) { // This is the control that hosts the child forms. this.childHost = (MdiClient)ctl; break; } } } }




Reply With Quote