Membuat Progressbar Vb.Net 2010
Tutorial Visual Basic Net Untuk pemula yang sudah kami posting sebelumnya silahkan dibaca - baca tentang Video Tutorial : CRUD (Create, Update, Delete) Vb.Net, Tutorial Vb.Net : Cara Install Visual Studio 2010 Ultimate,
langsung saja cara membuat tampilan Prosess Loading menggunakan Progressbar dan Timer di vb.net, project hasil akhirnya tampak seperti gambar dibawah ini,
Progressbar Clock |
Langkah membuat progressbar di vb.net
Pada Form1 Vb.Net buatlah 3 buah Progressbar dan 1 buah Timer serta label, sesuaikan seperti gambar diatas, dan selanjutnya copy seluruh code berikut :
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'progressbars and labels
ProgressBar1.Value = Convert.ToString(DateTime.Now.Hour) 'Hour
lblHour.Text = Convert.ToString(DateTime.Now.Hour)
ProgressBar2.Value = Convert.ToString(DateTime.Now.Minute) 'Minute
lblMinute.Text = Convert.ToString(DateTime.Now.Minute)
ProgressBar3.Value = Convert.ToString(DateTime.Now.Second) 'Seconds
lblSec.Text = Convert.ToString(DateTime.Now.Second)
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'hour
Label6.Text = " 1 5 10 15 20 23"
Label5.Text = "| | | | | | | | | | | | | | | | | | | | | | | |"
'minute
Label7.Text = "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |"
'seconds
Label9.Text = "| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |"
'date
lblTime.Text = DateTime.Today.ToLongDateString()
End Sub
End Class
Tekan F5 untuk menjalankan Aplikasi Progressbar anda, jangan lupa untuk bertanya pada kolom komentar jika ada yang bermasalah, terima kasih ;)