timer本身就是多线程.所以这样的错误很正常.. this.panel1.Invoke(new Action(()=>{
    this.panel1.Cursor = System.Windows.Forms.Cursors.Hand;
}));
 试试..

解决方案 »

  1.   

    应该了解 控件的invokerequired属性。
    http://msdn.microsoft.com/zh-cn/library/system.windows.forms.control.invokerequired(v=vs.110).aspx if (button1.InvokeRequired) {
                    button1.Invoke(new Action(() => { 
                             //..............
                    }));
                }
      

  2.   

    大哥我能在问个问题吗?我这里面Timer t,如何关闭。打开是不是 t.Enabled = true;    关闭是不是 t.Enabled = false;
      

  3.   

    这个东西自己测试下就好了  比如输出当前时间  弄2个按钮 分别调用
    t.Enabled = true;以及t.Enabled = false; 
    在.下 看看还有什么其他的东西..比如start....stop什么的...好像都可以
      

  4.   

    还有 start和stop方法的··
    Start就是启动
    Stop就是停止···
      

  5.   

    如果不需要System.Timers.Timer的多线程行为和精度,用System.Windows.Forms.Timer好了,这个是始终在UI线程执行的。
      

  6.   

    窗体加载时加一句
    System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;