110,538
社区成员
发帖
与我相关
我的任务
分享
Thread myth = new Thread(new ParameterizedThreadStart(runpro));
myth.Start(this);
public void runpro(object obj)
{
((Form1)obj).test();
}
public void test()//Form1的成员函数
{
MessageBox.Show("1");
}
public void test()//Form1的成员函数
{
if (this.InvokeRequired)
{
this.Invoke((Action)delegate { test(); });
return;
}
MessageBox.Show("1");
}