111,120
社区成员
发帖
与我相关
我的任务
分享
[/quote]
ok的,刚复制你的代码在我这里都运行得了,仔细检查吧 
private void button1_Click(object sender, EventArgs e)
{
timer1.Interval = 100;
timer1.Enabled = true;
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar1.Value >= 100)
progressBar1.Value = 0;
else progressBar1.Value = progressBar1.Value + 10;
Application.DoEvents();
}
有这个的话就不用加那句话了[/quote]
确实是这里的问题。多谢!
// timer1
//
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
就可以了,这是个什么情况?