Display the current time and date - Visual Basic .NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

show current time in visual basic .net

In order to show the current time, you need a timer and a label
Set the timer enable property to true.
Add the following code to the timer.tick event:

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Label1.Text = "It is Now " & Now
End Sub 

Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.