莒县网站设计,可免费注册的网站,南山的网站建设,中国电信 网站备案做了很多种方法 1#xff1a; 线程 thread的方法 2#xff1a; backGroundWorker的方法 3#xff1a; 自定义线程类 4#xff1a; 做一个进度条的窗体 通过自定义设置做#xff08;最方便快捷#xff09; public partial class waitingProcessbar : Form{public waitin…做了很多种方法 1 线程 thread的方法 2 backGroundWorker的方法 3 自定义线程类 4 做一个进度条的窗体 通过自定义设置做最方便快捷 public partial class waitingProcessbar : Form{public waitingProcessbar(){InitializeComponent();}/// summary/// 设定百分比/// /summaryprivate int percent;/// summary/// 字符显示百分比/// /summaryprivate string labelShow;public int Percent{get { return percent; }set {this.percent value;if (this.percent 100){this.Close();}this.progressBar1.Value percent;}}public string LabelShow{get { return this.labelShow; }set {this.labelShow value;this.label1.Text labelShow.ToString();}}public void ShowProcess(int num,string str){this.Show();this.Percent num;this.LabelShow str;progressBar1.Invalidate();label1.Refresh();}} 转载于:https://www.cnblogs.com/zhayunjia/p/4648460.html