private void Form2_Load(object sender, EventArgs e)
        {
            System.Timers.Timer aTimer = new System.Timers.Timer();
            aTimer.Elapsed += new ElapsedEventHandler(showbackground);  //到达时间的时候执行事件;
            // 设置引发时间的时间间隔 此处设置为1秒(1000毫秒) 
            aTimer.Interval = 100000;
            aTimer.AutoReset = true;//设置是执行一次(false)还是一直执行(true);
            aTimer.Enabled = true; //是否执行System.Timers.Timer.Elapsed事件;
        }        
        public void showbackground(object source, System.Timers.ElapsedEventArgs e)
        {
            Form2 form = new Form2();
                        for (int i=0; i < 3; i++)
                form.BackgroundImage = imageList1.Images[i];
        }
    }
}

解决方案 »

  1.   

    Form2 form = new Form2();
    新的一个窗体,需要Show()才能看到新窗体的样式!!
    当前窗体用this 关键字就OK了
      

  2.   

    aTimer.Interval = 100000;改成aTimer.Interval = 1000;
     int i=0;
     public void showbackground(object source, System.Timers.ElapsedEventArgs e)
      {
      Form2 form = new Form2();      for (int i=0; i < 3; i++)
      form.BackgroundImage = imageList1.Images[i];
      i++;
      if(i==3) i=0;
      }
      

  3.   

     formthis.BackgroundImage = imageList1.Images[i];