Sometimes e.MaximumProgress returns a value of 0. If you are trying to control a ProgressBar by dividing e.CurrentProgress by e.MaximumProgress, or by setting a ProgressBar's Maximum to e.MaximumProgress, you will get a divide by zero exception. To avoid this, always check the value of e.MaximumProgress before using it.