【发布时间】:2014-07-22 14:24:20
【问题描述】:
“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);
【问题讨论】:
-
您将最大值设置为 100,但尝试将值设置为 1000。
-
普通人,您将最大值设置为 100 并期望它接受 10000 作为值?
-
异常消息中具体有什么不清楚的地方?任何人都可以做的就是将消息读回给您。目前尚不清楚您对 SO 用户的期望。
标签: c# webbrowser-control