C#窗体设计:[31]Timer倒计时
1、新建一个C#应用程序,应用程序命名为Countdown。
![C#窗体设计:[31]Timer倒计时](https://exp-picture.cdn.bcebos.com/46315818dfdae43bba0a1d95c457935652bb7420.jpg)
3、双击窗体添加响应函数Form1_Load(),响应函数Form1_Load()中添加一下代艨位雅剖码:pri即枢潋雳vate void Form1_Load(object sender, EventArgs e) { txtTimeNow.Text = DateTime.Now.ToString(); txtEndTime.Text = "2015-10-01 00:00:00"; txtTimeNow.ReadOnly = true; txtEndTime.ReadOnly = true; this.timer1.Start();//计时器开始运行 }
![C#窗体设计:[31]Timer倒计时](https://exp-picture.cdn.bcebos.com/04201aa355e983ae665b469e68efe07815316920.jpg)
5、程序运行如下:
![C#窗体设计:[31]Timer倒计时](https://exp-picture.cdn.bcebos.com/2e223d85e036e291db642c54b2723d03baea5b20.jpg)
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:33
阅读量:88
阅读量:78
阅读量:62
阅读量:65