出大钱,求您来帮忙

解决方案 »

  1.   

    private void Form1_Load(object sender, System.EventArgs e)
    {
    this.timer1.Interval=1000;
    this.timer1.Enabled=true;
    } private void timer1_Tick(object sender, System.EventArgs e)
    {
    this.Text=System.DateTime.Now.ToString();
    }
      

  2.   

    public class Class1 {
        static System.Windows.Forms.Timer myTimer = new System.Windows.Forms.Timer();
        static int alarmCounter = 1;
        static bool exitFlag = false;
     
        // This is the method to run when the timer is raised.
        private static void TimerEventProcessor(Object myObject,
                                                EventArgs myEventArgs) {
           myTimer.Stop();
     
           // Displays a message box asking whether to continue running the timer.
           if(MessageBox.Show("Continue running?", "Count is: " + alarmCounter, 
              MessageBoxButtons.YesNo) == DialogResult.Yes) {
              // Restarts the timer and increments the counter.
              alarmCounter +=1;
              myTimer.Enabled = true;
           }
           else {
              // Stops the timer.
              exitFlag = true;
           }
        }
     
        public static int Main() {
           /* Adds the event and the event handler for the method that will 
              process the timer event to the timer. */
           myTimer.Tick += new EventHandler(TimerEventProcessor);
     
           // Sets the timer interval to 5 seconds.
           myTimer.Interval = 5000;
           myTimer.Start();
     
           // Runs the timer, and raises the event.
           while(exitFlag == false) {
              // Processes all the events in the queue.
              Application.DoEvents();
           }
        return 0;
        }
     }
      

  3.   

    myTimer.Interval = 1000;
      

  4.   

    是不是想实现web的啊?web的话Timer是没有用的,只能自己写
      

  5.   

    http://www.csdn.net/Develop/Read_Article.asp?Id=20695
      

  6.   

    为什么 WEB 的TIMER 控件没有作用的啊? 为什么,为什么啊?要自己写,怎么写啊
      

  7.   

    web你自己写一个事件触发不就OK了
      

  8.   

    在WinForm上可以,但是在WEB上就不可以,谁可以了,告诉我一声
      

  9.   

    javascript脚本:
    var sh=setInterval("test1()",1000)
    function test1()
    {
    var online=document.Form1.hid_online.value;
    var outline=document.Form1.hid_outline.value;
    window.location.href("User_List.aspx?online="+online+"&outline="+outline+"&"+Math.random()); //刷新本页
    或者触发一个按钮:
    obj=document.getElementById(buttonname);
    focus(obj);
    obj.click();
    }
      

  10.   

    web 里private void timer1_Elapsed