一个简单的计时器程序+源代码
附赠部分代码 //开始计时按钮单击事件 private void btnOk_Click(object sender, EventArgs e) { if (timer1.Enabled == false) { this.btnOk.Text = "停止计时"; this.timer1.Enabled = true; } else { this.btnOk.Text = "开始计时"; this.timer1.Enabled = false; } } //时钟控制事件 private void timer1_Tick(object sender, EventArgs e) { t = t + 1;//得到总的毫秒数 this.lblTime.Text = GetAllTime(t); } //加载事件 private void Time_Load(object sender, EventArgs e) { this.timer1.Enabled = false; this.timer1.Interval = 1; } 其余的部分下载看
文件列表
计时器.rar
(预估有个31文件)
计时器
Timer
Time.resx
48KB
Program.cs
516B
Properties
Settings.settings
249B
Resources.Designer.cs
3KB
AssemblyInfo.cs
1KB
Settings.Designer.cs
1KB
Resources.resx
5KB
用户评论