Breaking News

Timer In VB.net

Know More : Microsoft ASP.Net  Microsoft VB.Net  Microsoft C#.Net  Microsoft Sliverlight  XMLMicrosoft WPF  Microsoft WCF Ajax Microsoft SQL Server

Timer are also very useful control, because they let you periodic events and they do not appear in a window at run time.At design time,they appear in the component tray underneath the form you have added them to.  Let’s start in Visual Studio 2010 , Create a new project and name it “ Digital Clock ”. After this, drag label, timer from toolbox on the form1. As  shown in figure.
ScreenShot082
There is a timer at work behind the scenes in the timer which shows a clock using label control.This control is a useful one for,among other things,creating clocks. Now double click on  blank form1 and type in form_load event or copy and paste..                         Timer1.Enabled = True          and now back to from 1 designer  press  shift+ F7 button or go to view menu and select designer. Double click on timer1. Copy code and paste     Label1.Text = TimeOfDay    like this..
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
       Label1.Text = TimeOfDay
   End Sub



You Can also Convert VB.Net To C# , Python, Ruby . Now press F5 button or select debug from debug menu , the output will be shown in figure. Enjoy your digital clock. Thanks.
ScreenShot083

Know More : Microsoft ASP.Net  Microsoft VB.Net  Microsoft C#.Net  Microsoft Sliverlight  XMLMicrosoft WPF  Microsoft WCF Ajax Microsoft SQL Server

No comments