public partial class Form1 : Form
{
private delegate void FlushClient();//代理
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
FlushClient fc=new FlushClient(ThreadFunction);
this.Invoke(fc);
}
private void ThreadFunction()
{
// things you want to do
}
}
C#中多线程访问winform控件的方法
最新推荐文章于 2022-07-26 16:37:15 发布