首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

关于winform下实现dateTimePicker自动更新的有关问题

2012-12-28 
关于winform上实现dateTimePicker自动更新的问题pannel上放一个checkbox指示是否采用系统时间,并且定义一

关于winform上实现dateTimePicker自动更新的问题
pannel上放一个checkbox指示是否采用系统时间,并且定义一个计时器和一个dateTimepicker,问题是
dateTimepicker的值只有秒在跳动,分钟从来不变,求解。。。。。

C# code
 private void checkBox9_CheckedChanged(object sender, EventArgs e)        {            CheckBox checkBox = sender as CheckBox;            if (checkBox.Checked)            {                this.dateTimePicker25.Enabled = false;                this.timer1.Start();            }            else            {                this.dateTimePicker25.Enabled = true;                this.timer1.Stop();            }        }        private void timer1_Tick(object sender, EventArgs e)        {            this.dateTimePicker25.Value = DateTime.Now;        }


热点排行