现在时间可以显示出来了,用的timer_tick
但是为什么时间不对呢?电脑上是9:40
调试出来,它显示的是9:19

解决方案 »

  1.   

    private void timer1_Tick(object sender, EventArgs e)
            {
                label4.Text = System.DateTime.Now.ToString("H:M:s");
            }
      

  2.   

    你的TIMER1  的触发间隔是?
      

  3.   

     private void InitializeTimer()
            {
                // Call this procedure when the application starts.
                // Set to 1 second.
                timer1.Interval = 1000;
                timer1.Tick += new EventHandler(timer1_Tick);            // Enable timer.
                timer1.Enabled = true;
            }
      

  4.   

    timer1.Interval = 1000;
    timer1.Tick += new EventHandler(timer1_Tick);
    timer1.LastTickTime = DateTime.Now;http://msdn.microsoft.com/zh-cn/library/system.web.ui.timer.tick.aspx