Drawing on a Form does not always happen when you want it. The Refresh() method of a control comes in handy here.
See the following snippet and experiment by commenting out the Refresh.
Start a new WindowsForm project. From the toolbox, add a Label, ProgressBar and Button control on the Form. Set the Visible properties of the Label and ProgressBar to false. Double click the button and fill in the click handler with the code provided. Run the app.
Edited 6 Years Ago by ddanbe: n/a