MID主窗体的背景实际上是一个MIDCLIENT类型的子窗体,你可以在主窗体的CONTROLS中找到,你在这个子窗体上试试。参考:
http://expert.csdn.net/Expert/topic/2344/2344946.xml?temp=.2331201

解决方案 »

  1.   

    这一步我已经知道了 但在这个mdiclient上面创建的graphics不管用
      

  2.   

    用 Paint 事件啊。我已经试过没问题。
      

  3.   

    生成的g不对吧,为何不直接引用?
    Graphics g = e.Graphics;
    ...
      

  4.   

    Graphics g = this.Graphics;
      

  5.   

    这样试试
    private void Form1_Load(object sender, System.EventArgs e)
    {
        foreach(Control c in this.Controls)
        {
          if(c is MdiClient)
          {
    MdiClient mc = c as MdiClient;
    mc.Paint+=new PaintEventHandler(mc_Paint);
           }
         }
    }private void mc_Paint(object sender, PaintEventArgs e)
    {
      e.Graphics.FillRectangle(SystemBrushes.Highlight,((MdiClient)sender).ClientRectangle);
    }