control is used to represent the progress of a lengthy operation that takes time where a user has to wait for the operation to be finished.
Here I used ProcessBar Dynamically.
public partial class Form1 : Form
private void btnStart_Click(object sender, EventArgs e)
//creating a dynamic ProgressBar is to create an instance of ProgressBar class.
ProgressBar pBar = new ProgressBar();
//name of process bar
pBar.Name = "progressBar1";
// set height and width of processbar
pBar.Width = 200;
pBar.Height = 20;
//add the ProgressBar to a Form.
//The Dock property is used to set the position of a ProgressBar
pBar.Dock = DockStyle.Bottom;
//The Minimum and Maximum properties define the range of a ProgressBar
pBar.Minimum = 0;
pBar.Maximum = 100;
//The Value property represents the current value of a ProgressBar.
pBar.Value = 70;