Saturday, 21 January 2012

How to use the progress bar in vb.net


How to use progress bar in vb.net?
Step1:
Open Microsoft visual studio.
Step2:
File ànew project àselect the windows form application à rename it as progress bar
Step3:
Drag and drop Button, progress bar from tool box
Step4:
Change the properties of progress bar.
 to this


Double click the button1 copy the code
Public Class Form1
    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        ProgressBar1.Value = ProgressBar1.Value + 100
        If ProgressBar1.Value = 1000 Then
            Close()
        End If
    End Sub
End Class
 output: