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

施用tick函数,产生操作延时

2012-10-14 
使用tick函数,产生操作延时我用按钮控制timer的enable属性,但是总是会产生操作延时,是什么原理啊?求参考资

使用tick函数,产生操作延时
我用按钮控制timer的enable属性,但是总是会产生操作延时,是什么原理啊?求参考资料。
下附代码:

C# code
 private void timer1_Tick(object sender, EventArgs e)        {            this.progressBar1.Value = (timercounter);//updata the progress bar            //updata the label of time show            int result = this.TimeCalculate(out TimeShow);            this.lb_TimeShow.Text = TimeShow;                                        //alarm of time up            if (timercounter == frm_Start.TimeLimit)            {                this.progressBar1.Value = (frm_Start.TimeLimit);                this.timer1.Enabled = false;            }            timercounter++;        }        private void btn_OnHold_Click(object sender, EventArgs e)        {            timer1.Enabled = false;            btn_StartTimer.Enabled = true ;        }


[解决办法]
timer本来就是延时用的。

热点排行