for (int i = 0; i < 1000000; i++) { Math.DivRem(i, 1000, out j); if (j == 0) progressBar1.PerformStep(); }这个代码就ok了