Relative Content

Tag Archive for c#winforms.net-4.8

How can I close a “dummy” progress bar on 100% in Winforms?

I’m writing a small Winforms project that runs a certain task which completes almost instantaneously. So I want to add a “dummy” progress bar in a popup dialog to enhance the user experience. The bar doesn’t measure anything, it just iterates a value from 0 to a given maximum. When the progress bar reaches its maximum value, the dialog should close automatically. The problem I’m having is that the dialog always closes when the bar is only at about 90 percent.