我用
DateTime now = DateTime.Now;//获取了当前时间,然后lb1.Content = " "+ now; //可是如何做到在Label.content 里那个时间可以动的
望各位大神帮帮我这个新手

解决方案 »

  1.   

    这不是同步的问题,你可以设置一个时钟Timer,间隔时间一秒,在时钟事件中反复调用你的这两句话: DateTime now = DateTime.Now;//获取了当前时间,然后lb1.Content = " "+ now;  就可以了,
      

  2.   

    在你的Form类中加入这些:System.Windows.Forms.Timer myTimer = new System.Windows.Forms.Timer();    private void TimerEventProcessor(Object myObject,
                                                EventArgs myEventArgs) {DateTime now = DateTime.Now;//获取了当前时间,然后lb1.Content = " "+ now;   
        }//假设你的Form类名是MyForm,在它的Load事件中启动时钟,
       private void MyForm_Load(object sender, EventArgs e)
    {
           myTimer.Tick += new EventHandler(TimerEventProcessor);       myTimer.Interval = 1000;
           myTimer.Start();}
      

  3.   

    用Timer控件,每过一秒执行一次datatime.now
      

  4.   

    搞个timer,把你的代码放到timer中,timer的间隔设置为500就行