本帖最后由 xbycszozbsgw 于 2012-07-08 10:13:27 编辑

解决方案 »

  1.   

     timer.Tick+= new System.Timers.ElapsedEventHandler(timer1_Tick);private void timer1_Tick( object sender, EventArgs e )
    {
       this.Title += "HelloWorld";
    }
      

  2.   

    timer没有Tick这个成员啊。你用的是哪种Timer类?
      

  3.   

    Tick事件如果是线程定时器,需要用委托
      

  4.   

    System.Timers.Timer没有Tick事件,只有Elapsed事件啊。http://msdn.microsoft.com/zh-cn/library/system.timers.timer%28v=vs.100%29.aspx
      

  5.   

    虽然没有Tick事件,不过你还是说对了关键点:需要用委托。因为Elapsed事件,也是在别的线程上执行的。
      

  6.   

    怎么没有Tick事件。。你用的不是线程定时器,直接在Tick事件里写要定时执行的代码就可以了
      

  7.   

    我用的是System.Timers.Timer,不是System.Threading.Timer。不过其实两者是很相近的。
      

  8.   

    原来你们说的Tick事件,是System.Windows.Forms.Timer.Tick事件。
      

  9.   

    建议用javascript的setTimeout 
      

  10.   

    如果把timer放在在WEB页中,它只能在程序的后台启动一个进程,但它是运行在服务端的,并非运行在客户端,客户端是不会有用的。因为服务端数据的获取,需要客户端主动去请求才能取到,它不能象CS程序那样,由服务端主动向客户端推送.