mmbguide
یک شنبه 28 دی 1393, 22:59 عصر
سلام به همه دوستان
من میخوام رنگ پس زمینه MDIWindow رو تغییر بدم ولی به این کد رسیدم و میخواستم اگه کسی میدونه توضیح بده چرا اینقدر دردسر واسه تغییر رنگ
MdiClient ctlMDI;
// Loop through all of the form's controls looking
// for the control of type MdiClient.
foreach (Control ctl in this.Controls)
{
try
{
// Attempt to cast the control to type MdiClient.
ctlMDI = (MdiClient) ctl;
// Set the BackColor of the MdiClient control.
ctlMDI.BackColor = this.BackColor;
}
catch (InvalidCastException exc)
{
// Catch and ignore the error if casting failed.
}
}
// Display a child form to show this is still an MDI application.
Form2 frm = new Form2();
frm.MdiParent = this; frm.Show();
من میخوام رنگ پس زمینه MDIWindow رو تغییر بدم ولی به این کد رسیدم و میخواستم اگه کسی میدونه توضیح بده چرا اینقدر دردسر واسه تغییر رنگ
MdiClient ctlMDI;
// Loop through all of the form's controls looking
// for the control of type MdiClient.
foreach (Control ctl in this.Controls)
{
try
{
// Attempt to cast the control to type MdiClient.
ctlMDI = (MdiClient) ctl;
// Set the BackColor of the MdiClient control.
ctlMDI.BackColor = this.BackColor;
}
catch (InvalidCastException exc)
{
// Catch and ignore the error if casting failed.
}
}
// Display a child form to show this is still an MDI application.
Form2 frm = new Form2();
frm.MdiParent = this; frm.Show();