做了很多種方法?
1:
線程 thread的方法
2:
backGroundWorker的方法
3:
自定義線程類
4:
做一個進度條的窗體 ?通過自定義設置做(最方便快捷)
public partial class waitingProcessbar : Form{public waitingProcessbar(){InitializeComponent();}/// <summary>/// 設定百分比/// </summary>private int percent;/// <summary>/// 字符顯示百分比/// </summary>private 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();}}
?