progressBar1.Maximum = 100;//设置最大长度值
progressBar1.Value = 0;//设置当前值
progressBar1.Step = 5;//设置没次增长多少
for (int i = 0; i < 10; i++)//循环
{
System.Threading.Thread.Sleep(1000);//暂停1秒
progressBar1.Value += progressBar1.Step;让进度条增加一次
}