
/// <summary>
/// 更改Mdi背景样式
/// </summary>
private void ChangeMidBackStyle()
{
//更改Mdi背景样式
MdiClient mctMdi = new MdiClient();
foreach (Control conMid in this.Controls)
{
//得到Mdi
if (conMid.GetType().ToString() == "System.Windows.Forms.MdiClient")
{
mctMdi = (System.Windows.Forms.MdiClient)conMid;
//改变背景颜色
mctMdi.BackColor = Color.FromArgb(238, 243, 250);
if (File.Exists("img/ContextMenu/Back.png"))
{
//改变背景图片排列
this.BackgroundImageLayout = ImageLayout.Center;
//改变背景图片
mctMdi.BackgroundImage = Image.FromFile(@"img\ContextMenu\Back.png");
}
break;
}
}
}