Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

Why do I get an exception in my progress changed method?

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.