感觉就是一个很简单的小程序,都会卡顿,不明白原理是什么,求各位指教多线程进度条 卡顿

解决方案 »

  1.   

    你的循环里如果不给界面响应消息的话,肯定会卡,所以你如果不加线程的话在循环里加个Application.DoEvents()吧
      

  2.   

    把更新进度条值的代码,放到事件里面去试试
    类似于这样
            //下载过程处理
            private void MyWebClient_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e)
            { 
                this.PBar_DonwLoad.Value = e.ProgressPercentage;
                if (e.ProgressPercentage != 100)
                {               
                    this.BT_Login.Text = "更新:" + e.ProgressPercentage.ToString() + "%";
                }
            }