from C#中多线程访问winform控件的方法
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
}
}