ProgressBar Clock in VB.NET
Submitted by donbermoy on Monday, April 20, 2015 - 23:41.
Today, I will teach you how to create a program that displays a clock using the ProgressBar in VB.NET.
Now, let's start this tutorial!
1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application.
2. Next, add a Timer named Timer1. Insert 3 ProgressBar named ProgressBar1, ProgressBar2, and ProgressBar3 for Hour, Minute, and Seconds, respectively. Insert also labels such as lblTime for the real time, lblHour for the hour, lblMinute for minutes, and lblSec for seconds., You must design your interface like this:
3. Now lets code for our Form.
We will have first to code the Timer1 as it ticks and will breakdown the time into hours, minutes, and seconds to display the time value of the progressbars and labels.
Now, we will code for the Form_Load so that it will display the exact calibration of the time such as hours, minutes, and seconds. Also, it will display the real time on our label.
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Best Regards,
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Mobile: 09488225971
Landline: 826-9296
E-mail:[email protected]
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware

- 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
Output:

Add new comment
- 663 views