[英]Show Webbrowser Control Upload Percentage c#
I have a Windows Form application in c#. 我在c#中有一个Windows窗体应用程序。 in my application i have a WebBrowser Control.
在我的应用程序中,我有一个WebBrowser控件。 in my program web browser will upload a file i want to show in my program what percentage of file is uploaded.
在我的程序中,网络浏览器将上传一个文件,我想在我的程序中显示文件上载的百分比。 how can i do this ?
我怎样才能做到这一点 ?
look at web browser ProgressChanged . 看一下Web浏览器ProgressChanged 。 This event has an argument as
WebBrowserProgressChangedEventArgs
which holds CurrentProgress
property which you can use to show with the progress bar. 此事件的参数为
WebBrowserProgressChangedEventArgs
,其中包含CurrentProgress
属性,您可以使用该属性与进度条一起显示。
WebBrowser1.ProgressChanged += WebBrowser1_ProgressChanged;
private void WebBrowser1_ProgressChanged(object sender, WebBrowserProgressChangedEventArgs e) {
ProgressBar1.Value = e.CurrentProgress;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.