实现效果:
知识运用:
ToolStripProgressBar控件的Step属性; //获取或设置调用PerformStep方法时ToolStripProgressBar
public int Step {get;set} //的当前值的增加量
和PerformStep方法
实现代码:
private void timer1_Tick(object sender, EventArgs e) { while(toolStripProgressBar1.Value<=toolStripProgressBar1.Maximum) { toolStripProgressBar1.PerformStep(); } }