Integer division is causing it;
int m = (i/arr.Length)*100;
i
divided by
arr.lenght
will always be zero.
Change it to
int m = (int)((i/(double)arr.Length)*100);
And then set the progress to;
backgroundWorker1.ReportProgress(m);
Hope this helps,
Fredrik