public void Thread1()
{
System.Threading.Thread.Sleep(100);
this.Invoke(new EventHandler(delegate
{
textBox1.text = "1";
}));
this.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() =>
{
textBox1.text = "2";
}));
}
Thread thread1 = new Thread(new ThreadStart(Thread1));
thread1.Start();
C# 线程 调用控件
最新推荐文章于 2023-03-24 11:15:55 发布