Professional Documents
Culture Documents
Progress Bar
LAB 9
Muhammad kamran
Email: kamran_comsian@ymail.com
ProgressBar control
• A ProgressBar control is used to represent the
progress of a lengthy operation that takes
time where a user must wait for the operation
to be finished.
2
Creating a ProgressBar
3
Design-time
4
Design-time
5
Setting ProgressBar Properties
• After you place a ProgressBar control on a
Form, the next step is to set the properties.
• The easiest way to set the properties is from
the Properties Window.
• You can open the Properties window by
pressing F4 or right-clicking on a control and
selecting the "Properties" menu item.
• The Properties window looks as in Figure 2.
6
Setting ProgressBar Properties
7
Minimum, Maximum, and Value
• The Minimum and Maximum properties define the range of a ProgressBar. The
Value property represents the current value of a ProgressBar. The current value of
the ProgressBar for the minimum value is the color green to show the progress of
the control. We can also use the Value property to show the progress of an
operation.
• C# Code:
• pBar.Minimum = 0;
• pBar.Maximum = 100;
• pBar.Value = 70;
8
A ProgressBar with a value looks as in Figure 3.
9
Questions?