W
Wil Godsell
Guest
This is my code
Public Class Form1
Dim MyDate As Date = CDate("13 Dec 2019")
Dim sec As Integer
Dim Secs As Integer
Dim Mins As Integer
Dim Hours As Integer
Dim Days As Integer
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim idelay As Integer = 1
Timer1.Interval = idelay
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Hours = DateDiff(DateInterval.Hour, Now(), MyDate).ToString
Mins = DateDiff(DateInterval.Minute, Now(), MyDate).ToString
Secs = DateDiff(DateInterval.Second, Now(), MyDate).ToString
Days = DateDiff(DateInterval.Day, Now(), MyDate).ToString
Hour.Text = Hours
Minutes.Text = Mins
Seconds.Text = Secs
Day.Text = Days
End Sub
Private Sub Minutes_Click(sender As Object, e As EventArgs) Handles Minutes.Click
End Sub
Private Sub Day_Click(sender As Object, e As EventArgs) Handles Day.Click, Day.Click
End Sub
Private Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged
End Sub
Private Sub Hour_Click(sender As Object, e As EventArgs) Handles Hour.Click, Hour.Click
End Sub
Private Sub Seconds_Click(sender As Object, e As EventArgs) Handles Seconds.Click
End Sub
End Class
Continue reading...
Public Class Form1
Dim MyDate As Date = CDate("13 Dec 2019")
Dim sec As Integer
Dim Secs As Integer
Dim Mins As Integer
Dim Hours As Integer
Dim Days As Integer
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim idelay As Integer = 1
Timer1.Interval = idelay
Timer1.Enabled = True
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Hours = DateDiff(DateInterval.Hour, Now(), MyDate).ToString
Mins = DateDiff(DateInterval.Minute, Now(), MyDate).ToString
Secs = DateDiff(DateInterval.Second, Now(), MyDate).ToString
Days = DateDiff(DateInterval.Day, Now(), MyDate).ToString
Hour.Text = Hours
Minutes.Text = Mins
Seconds.Text = Secs
Day.Text = Days
End Sub
Private Sub Minutes_Click(sender As Object, e As EventArgs) Handles Minutes.Click
End Sub
Private Sub Day_Click(sender As Object, e As EventArgs) Handles Day.Click, Day.Click
End Sub
Private Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged
End Sub
Private Sub Hour_Click(sender As Object, e As EventArgs) Handles Hour.Click, Hour.Click
End Sub
Private Sub Seconds_Click(sender As Object, e As EventArgs) Handles Seconds.Click
End Sub
End Class
Continue reading...