Creating a clock in VB2010

Creating a clock in VB2010 is pretty easy. First of all you need to insert a timer control into your form and set its interval to 1000, which is equivalent to 1 second. Next, insert a label, clear its text and set an appropriate size(you need to disable autosize).

Now click on the timer and key in the following code:

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

Label1.Text = TimeOfDay

End Sub

Execute the code and you have your clock up and running.

ISad!

We at VBTUTOR.NET felt deeply saddened by the passing of one of the greatest men in the human history. His inventions have profound influence on our daily life, especially in the way we communicate and socialise with each other. We are deeply impressed and motivated by the way he deal with terminal illness and death! Despite his condition, he never wasted time feeling depressed and abstained from leading normal life, instead he went on to innovate and created the great iphone and ipad! What a good role model for the entire human society! R.I.P Steve.

To read more about the life of the Apple’s founder, you can take a look at the following books: