本文實例講述了C#實現更改MDI窗體背景顏色的方法。分享給大家供大家參考。具體實現方法如下:
/// <summary>/// 設置MDI背景/// </summary>void RemoveMdiBackColor(){ foreach (Control c in this.Controls) { if (c is MdiClient) { c.BackColor = this.BackColor; //顏色 c.BackgroundImage = this.BackgroundImage; //背景 } }}
希望本文所述對大家的C#程序設計有所幫助。
新聞熱點
疑難解答