VB.NET ProgressBar Control
The Window ProgressBar control is used by the user to acknowledge the progress status of some defined tasks, such as downloading a large file from the web, copying files, installing software, calculating complex results, and more.
Let's create a ProgressBar by dragging a ProgressBar control from the toolbox and dropping it to the Windows form.
Step 1: The first step is to drag the ProgressBar control from the toolbox and drop it on to the Form.
Step 2: Once the ProgressBar is added to the Form, we can set various properties of the ProgressBar by clicking on the ProgressBar control.
Properties of the ProgressBar Control
There are following properties of the VB.NET ProgressBar control.
||The BackgroundImage property is used to set the background image in the progressbar control.
||It is used to determine the progress status for a progress bar in milliseconds.
||The padding property is used to create a space between the edges of the progress bar by setting the value in the progressbar control.
||It is used to get or set a value in control that calls the PerformStep method to increase the current state of the progress bar by adding a defined step.
||It is used to set the maximum length of the progress bar control in the windows form.
||It is used to set or get the minimum value of the progress bar control in the windows form.
||It obtains a value representing whether the progress bar control enables the user to be dragged onto the form.
||It is used to set a value that represents how types the progress bar should be displayed on the Windows Form.
Methods of the ProgressBar Control
||The ForeColor method is used to reset the forecolor to its default value.
||The ToString method is used to display the progress bar control by returning the string.
||It is used to increase the current state of the progress bar control by defining the specified time.
||The PerformStep method is used to increase the progress bar by setting the step specified in the ProgressBar property.
Events of the ProgressBar Control
||The Leave event occurs when the focus leaves the progress bar control.
||A MouseClick event occurred when the user clicked on the progress bar control by the mouse.
||When the background property changes to the progress bar control, the BackgroundImageChanged event changes.
||It occurs when the property of the text is changed in the progress bar control.
||It occurs when the padding property is changed in the progress bar control.
Furthermore, we can also refer to VB.NET Microsoft documentation to get a complete list of ProgressBar control properties, methods, and events in the VB.NET.
Let's create a program to display the progress status in the VB.NET Windows form.
Click on the Show button to display the progress status at run time in Windows Form.
And when the progress status reaches the progress bar's maximum value, it displays the following message.