Digital Clock

 

Visual Basic programming is so simple that sometime you just need to write a one line code to create a wonderful tiny little but nice application. The program for today is just such a program, it is a digital clock.

 

The Design Interface

The Run Time Interface

 

The Codes

     Private Sub Timer1_Timer()
 

              Label1.Caption = Time

       End Sub

Although the code is easy, you need to modify  some properties of the timer control. You need to insert a timer control into the form and set its interval value to 1000 in the properties windows, directing Visual Basic to update the time every 1000 milliseconds, or once a second.

 

[Back to VBToday]