02 April 2014

VB.NET: ProgressBar Control


ProgressBar adalah sebuah control animasi yang digunakan untuk menunjukan kemajuan sebuah proses dalam skala interval.


Contoh penggunaan ProgressBar.
UI

Code
Public Class Form1

 Private Sub Form1_Load(ByVal sender As System.Object, _
     ByVal e As System.EventArgs) Handles MyBase.Load
     Label1.Text = "Klik tombol 10 kali."
     ProgressBar1.Value = 0
     ProgressBar1.Minimum = 0
     ProgressBar1.Maximum = 10
     Button1.Text = "Maju +1"
 End Sub

 Private Sub Button1_Click(ByVal sender As System.Object, _
     ByVal e As System.EventArgs) Handles Button1.Click
     If ProgressBar1.Value < 10 Then
         ProgressBar1.Value = ProgressBar1.Value + 1
     End If
 End Sub

End Class


Runtime


Click here if you like this article.


0 comments: