winfrom中进度条的使用
private void button1_Click(object sender, EventArgs e) { int value = progressBar1.Value = progressBar1.Value - progressBar1.Step; if (value >= progressBar1.Minimum) { progressBar1.Value = value; label2.Text = value.ToString(); } // label2.Text = progressBar1.Value.ToString(); } private void button2_Click(object sender, EventArgs e) { progressBar1.PerformStep(); label2.Text = progressBar1.Value.ToString(); if (label2.Text=="100") { MessageBox.Show("加载完成!!!"); } }