怎么在定时器中更新LABEL的值,请看代码
private void timer1_Tick(object sender, System.EventArgs e)
{
labMess.Text = "hhhhuyddrdeetnnn ";
timer1.Enabled = false;
labMess.Text = "2222222222222222 ";
Thread.Sleep(50000);
labMess.Text = "6666666666666666 ";
Thread.Sleep(50000);
timer1.Enabled = true;
}
定时器为5秒,LABEL原来的值是 "AAAAAAAAAAA ",把断点设到timer1.Enabled = true
可是到了断点后,LABEL的值还是 "AAAAAAAAAAA ",请问高手这是怎么回事.谢谢
------解决方案--------------------labMess.Text = "6666666666666666 ";
labMess.Refresh();
立即成为编程经验丰富的程序员不是梦,详见:http://www.psec.net.cn