首页上一页 1 下一页尾页 1 条记录 1/1页
《c#从入门到精通》TM\sl\13\35例子问题
发表在C#图书答疑
2009-03-07
是否精华
是
否
版块置顶:
是
否
用vs2005打开光盘里的这个程序,就能看到进度条控件运行,我自己做个就不行运行就能提示系统日期但没进度条出来,然后我在光盘给的程序里加个toolstripProgressBar2,跟光盘的toolstripProgressBar1都一样了,还是只是有toolstripProgressBar1的运行出来,我想问下,我的问题是出在什么地方?谢谢!
private void button1_Click(object sender, EventArgs e)
{
this.toolStripProgressBar1.Minimum = 0;
this.toolStripProgressBar1.Maximum = 5000;
this.toolStripProgressBar1.Step = 2;
this.toolStripProgressBar2.Minimum = 0;
this.toolStripProgressBar2.Maximum = 5000;
this.toolStripProgressBar2.Step = 1;
for (int i = 0; i <= 4999; i++)
{
this.toolStripProgressBar1.PerformStep();
}
for (int i = 0; i <= 4999; i++)
{
this.toolStripProgressBar2.PerformStep();
}
}
我在form1.cs[设计]里加上了toolStripProgressBar2
private void button1_Click(object sender, EventArgs e)
{
this.toolStripProgressBar1.Minimum = 0;
this.toolStripProgressBar1.Maximum = 5000;
this.toolStripProgressBar1.Step = 2;
this.toolStripProgressBar2.Minimum = 0;
this.toolStripProgressBar2.Maximum = 5000;
this.toolStripProgressBar2.Step = 1;
for (int i = 0; i <= 4999; i++)
{
this.toolStripProgressBar1.PerformStep();
}
for (int i = 0; i <= 4999; i++)
{
this.toolStripProgressBar2.PerformStep();
}
}
我在form1.cs[设计]里加上了toolStripProgressBar2