开发者

ProgressBar for multiple WebBrowser instances

开发者_StackOverflow社区How can I aggregate the CurrentProgress properties of multiple (dynamic amount) of WebBrowsers together so that a ProgressBar will look accurate?


if (currentProgressBar != null)
        {
            (currentProgressBar as ToolStripProgressBar).Maximum = (currentProgressBar as ToolStripProgressBar).Maximum;
            (currentProgressBar as ToolStripProgressBar).Value = preValue + ((100 * (Int32)e.CurrentProgress) / (Int32)e.MaximumProgress);
            if (e.CurrentProgress >= e.MaximumProgress)
            {
                preValue = (currentProgressBar as ToolStripProgressBar).Value;
            }
        }

This was how i was able to get the progress bar to display correctly for multiple web browser controls.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜