RT,谢谢。

解决方案 »

  1.   

    protected void WndProc(ref Message m)
    {
       if (m.Msg!=WM_ERASEBKGND)
          base.WndProc(ref m);
    }
      

  2.   

    什么都不需要引用,直接在Form1里面写上面的代码就行了
      

  3.   


    使用你的代码,报以下错误。警告 1 “Showroom.Form1.WndProc(ref System.Windows.Forms.Message)”将隐藏继承的成员“System.Windows.Forms.Form.WndProc(ref System.Windows.Forms.Message)”。若要使当前成员重写该实现,请添加关键字 override。否则,添加关键字 new。 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Showroom\Showroom\Form1.cs 29 24 Showroom错误 2 当前上下文中不存在名称“WM_ERASEBKGND” C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Showroom\Showroom\Form1.cs 31 26 Showroom如果将WM_ERASEBKGND做字符串,用引号引起来的话,就会报无法将String转换为Int错误。
      

  4.   


    很难想象你的水平,你居然连WM_ERASEBKGND是什么意思都不懂?那你怎么会问这个问题?
    protected override void WndProc(ref Message m) 

      const int WM_ERASEBKGND=0x14; 
      if (m.Msg!=WM_ERASEBKGND) 
          base.WndProc(ref m); 
    }我不知道你这个问题是怎么产生的,你对windows消息一无所知,怎么会有这个需求?结贴吧,这个帖子都发出很久了
      

  5.   

    这段时间常看到CsToD这位仁兄,唉~~无语……楼主忍忍吧,呵呵。
      

  6.   

    CsToD 是正解~
    不过楼主确实很菜