Browse this blog

Thursday, September 3, 2009

Coding a clock with VB2008

For coding a clock you only need a timer and a label.

Put the timer setting on "enabled" and the interval on "1000".

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick


Me.Label1.Text = My.Computer.Clock.LocalTime


End Sub

This is the whole code. Have fun with your clock

No comments:

Post a Comment