Show running time in label control in vb.net

Satyapriyanayak
Posted by Satyapriyanayak under VB.NET category on | Points: 40 | Views : 941
In this Code Snippet we will know how to display running time in label control. 

Set timer interval 100

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Label1.Text = Now.TimeOfDay.ToString()
End Sub
End Class

Comments or Responses

Login to post response