winform Timer控件的使用

Posted 水墨晨诗

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了winform Timer控件的使用相关的知识,希望对你有一定的参考价值。

private void button1_Click(object sender, EventArgs e){
                    Timer timer1 = new Timer();
                    timer1.Interval = 1000;
                    timer1.Enabled = true;
                    timer1.Tick += new EventHandler(timer1EventProcessor);//添加事件
}    

 private void timer1EventProcessor(object sender, EventArgs e)
        {
            do sth……
        }

 

以上是关于winform Timer控件的使用的主要内容,如果未能解决你的问题,请参考以下文章