ProgressBar in C#


The attached class shows how to implement progress bar in C#. See attached file for more comments. Here is a chunk from the file:

progressBar1.Maximum = 10;
progressBar1.Location =
new System.Drawing.Point(8, 312);
progressBar1.Minimum = 0;
progressBar1.TabIndex = 0;
progressBar1.Value = 0;
//We have calculated the excat size which will result in only 20 boxes to be drawn
progressBar1.Size = new System.Drawing.Size(520, 40);
progressBar1.Step = 1;
.................