值“ 345900”对于“值”无效。“价值”应介于“最小值”和“最大值”之间。参数名称:值
if (e.CurrentProgress > 0)
{
progressBar1.Value = Convert.ToInt32(e.CurrentProgress);
progressBar1.Maximum = (100);
progressBar1.Minimum = (0);
}
else
progressBar1.Value = Convert.ToInt32(0);
更新:感谢大家对我的帮助。尽管找到了解决方案,但我仍然找到了解决方案。
if ((e.CurrentProgress > 0) && (e.MaximumProgress > 0))
{
progressBar1.Maximum = Convert.ToInt32(e.MaximumProgress);
progressBar1.Step = Convert.ToInt32(e.CurrentProgress);
progressBar1.PerformStep();
progressBar1.Refresh();
}
else
progressBar1.Value = (0);
更新我不确定在编辑问题之前,以下答案是否有意义。但是,在:-)之后,它看起来毫无意义。
很难说,但是也许换行会有所帮助(而且我想没有必要unchecked
):
progressBar1.Maximum = Convert.ToInt32(e.MaximumProgress);
progressBar1.Value = Convert.ToInt32(e.CurrentProgress);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句