Hello,
It seems trivial, but I cant find a clean algorithm to this.
I can calculate my total rows to 2186.
Then I thought I do a 2186 / 100 = 21 (which would be my modNr) Then I thought I would increment the currentRowNr++ inside Backgroundworker.reportprocess() And do a if(currentRowNr % modNr == 0) increment progressbar.
The progress bar now seems to behave correctly however, it doesnt stop at 100. I get an expection that the number went over maximal of 100. My algorithm seems wrong.
There must be a clean solution for this and I am just making it overcomplicated. Anyone good in math? ;-)
Thank you