I have several large files that I’m processing and I’m using the backgroundWorker1.ReportProgress(percent) to report the progress as each file is finished. But now I want to have a second progress bar to report the progress for each individual file as it’s being processed (and resets for the next file). I can use the current byte position I’m reading from and divide by the total size of the file to get the progress in percentage. But how do I pass this value to progressBar2 if there’s only one ProgressChanged event?
I have several large files that I’m processing and I’m using the backgroundWorker1.ReportProgress(percent) to
Share
One way is to use BackgroundWorker.ReportProgress(Int32, Object) and pass whatever you want, in the userState parameter.
Another is to simply know that when you’ve reached 100% on the first progress bar you need to increment the other bar.