1. 程式人生 > >.net 委託多執行緒 實時更新介面

.net 委託多執行緒 實時更新介面

 

 

Thread thread = new Thread(() =>
{

 button2.Invoke(new EventHandler(delegate { button2.Enabled = true; }));

  this.Invoke(new EventHandler(delegate { this.Text = "正在傳輸表:" + tableName; }));

});

thread.IsBackground = true;
thread.Start();