Me.Timeline1.Duration = New Duration(New TimeSpan(0, 0, 1)) Me.Timeline1.Begin()
This Timeline1 object is from the XAML file that was added to the rectangle control. This object triggers a Completed event every second that has been set through the Duration object. Now to add code for the Completed event we will select Timeline1 object from the code editor and select its corresponding Completed event. For the Completed event handler we will add code that will take the hours, minutes, seconds, and dates from the current time and display them on the respective TextBlock controls. The following code snippet shows that:
Dim hours As TextBlock = Me.showTime.Children(1) Dim mins As TextBlock = Me.showTime.Children(2) Dim second As TextBlock = Me.showTime.Children(3) Dim showdate As TextBlock = Me.showTime.Children(4) hours.Text = Now.Hour.ToString mins.Text = Now.Minute.ToString second.Text = Now.Second.ToString showdate.Text = "Date : " + Now.Day.ToString + " / " + Now.Month.ToString + " / " + Now.Year.ToString Me.Timeline1.Begin()
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.