C#跨线程操作控件
            解决方法:

private void change() { this.label1.Text = "已发生变化"; } private void threadchange() //通过委托处理,MSDN上又很详细用法的说明 { MethodInvoker In = new MethodInvoker(change); this.BeginInvoke(In); } private void button1_Click(object sender, EventArgs e) { Thread cha = new Thread(new ThreadStart(threadchange)); cha.Start(); }

发布于 posted on 2007年7月14日 16:17   由 祥子
:: 

Powered by Community Server Powered by CnForums.Net