110,570
社区成员
发帖
与我相关
我的任务
分享
public partial class Screen1
{
private System.Threading.Timer t1;
void Screen1_Opened(System.Object sender, System.EventArgs e)
{
t1=new System.Threading.Timer(new TimerCallback(countTimer),null,0,1000);//定时器线程
}
void countTimer(object ob)
{
this.Invoke( this.Text1.Text="hello");//委托UI线程去修改控件值
}
}