file copy progress bar


good day all

i know how can make progress bar copying file.

i not sure if should use buffer or copy bytes copied , forth.

thank you

just move code posted button click event , source , destination textboxes:

    private void button1_click(object sender, eventargs e)     {       webclient wc = new webclient();       wc.downloadprogresschanged += downloadprogress;       wc.downloadfileasync(new uri(sourcetextbox.text), destinationtextbox.text);     }     void downloadprogress(object sender, downloadprogresschangedeventargs e)     {       progressbar1.value = e.progresspercentage;     }
code runs asynchronously keeping ui responsive.



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'