I want to display progress from a BackgroundWorker to a ProgressBar in the UI. What I dont understand is why the BackgroundWorker's ReportProgress function takes an Int32 when the ProgressBar can take a double value for progress. My process is very intricate and I need to make decimal progress updates. It doesnt help if I have to keep adjusting everything to the nearest integer. Can anyone suggest someway i can work around this?
The ProgressChangedEventArgs Class can take an optional UserState value. You can pass anything you want to this (including for example a double value). Set it with the ReportProgress method
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With