20150511---Timer计时器(备忘)

private void timer1_Tick(object sender, EventArgs e)
        {
            TimeSpan ts = new TimeSpan(0, 0, 0);
            string str = ts.Hours + ":" + ts.Minutes + ":" + ts.Seconds;
            labtime.Text = str;
            ts = ts.Subtract(new TimeSpan(0, 0, -1));
        }

image  image

注:TimeSpan主要用来进行倒计时。

原文地址:https://www.cnblogs.com/Tirisfal/p/4495116.html