解决方案 »

  1.   


            private void button1_Click(object sender, EventArgs e)
            {
                ThreadPool.QueueUserWorkItem((object o) =>
                    {
                        for (int i = 1; i <= 100; i++)
                        {
                            this.label1.Invoke(new Action(() => this.label1.Text = i + "%"));
                            this.progressBar1.Invoke(new Action(() => this.progressBar1.Value = i));
                        }
                    });            ThreadPool.QueueUserWorkItem((object o) =>
                {
                    for (int i = 1; i <= 100; i++)
                    {
                        this.label2.Invoke(new Action(() => this.label2.Text = i + "%"));
                        this.progressBar2.Invoke(new Action(() => this.progressBar2.Value = i));
                    }
                });
            }
      

  2.   

    提示:1、Invoke;2、Application.DoEvents();
      

  3.   

    线程池 吧   另外有可能会需要从worker thread 调用主界面UI  
      

  4.   

    直接在窗体里定义一组属性
    在set里把值赋值给进度条控件,不行吗