C#线程调用带参数的方法,给控件赋值


System.Threading.Thread thread = new System.Threading.Thread(() =>
{ui

//各类业务this


//定义一个委托
public delegate void ProcessDelegate(string a);
if (this.lbStatus.InvokeRequired)
{
ProcessDelegate df = new ProcessDelegate(AddStatus);
this.Invoke(df, new object []{ "调用Web Service过程产生错误:" + ls_ErrMsg });
}
});
thread.IsBackground = true;
thread.Start;.net

----以上本身修改,亲测可使用htm

参考自 : http://www.jb51.net/article/56428.htmstring

相关文章
相关标签/搜索