public DrawingForm() {
  // Required for Windows Form Designer support
  InitializeComponent();  // Trigger a Paint event when the form is resized
  this.SetStyle(ControlStyles.ResizeRedraw, true);
}
You should add the last sentence in your application.

解决方案 »

  1.   

    还是不可以啊,是这样加吗?
    public Form1()
    {
    //
    // Windows 窗体设计器支持所必需的
    //

    InitializeComponent();
    this.KeyDown+=new KeyEventHandler(Form1_KeyDown);
    this.timer.Start();
    // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
    this.SetStyle(ControlStyles.ResizeRedraw, true);
    }
      

  2.   

    调用
    Validate()迫使窗口重新绘制,就可以去掉你原先那个矩形,
    因为实际上你最小化后在重新恢复后就是调用了一个Validate(),
    使窗口客户区重画                                     wish u good luck
                                               Greatsft
      

  3.   

    搞定,谢谢。
    原来在timer_Tick(object sender, System.EventArgs e)里面加进以下就可以了。
    this.timer.Start();