countdown timer problem!
Posted: Sat Feb 15, 2014 9:44 pm
I found the following countdown timer code from another web site. It works pretty good.
1 Dim startdate As DateTime = DateTime.Parse(Date.Now)
2 Dim enddate As DateTime = DateTime.Parse("20104-02-24 18:00")
3 Dim ts As TimeSpan = enddate.Subtract(startdate)
4 Label1.Text = CStr(ts.Days) & " Days, " & CStr(ts.Hours) & " Hours, " & CStr(ts.Minutes) & " minutes, " & CStr(ts.Seconds) & " seconds!"
please give me a code to stop timer on end date & open another form (ex: form 3)on that day automatically.
thaks in advance!
1 Dim startdate As DateTime = DateTime.Parse(Date.Now)
2 Dim enddate As DateTime = DateTime.Parse("20104-02-24 18:00")
3 Dim ts As TimeSpan = enddate.Subtract(startdate)
4 Label1.Text = CStr(ts.Days) & " Days, " & CStr(ts.Hours) & " Hours, " & CStr(ts.Minutes) & " minutes, " & CStr(ts.Seconds) & " seconds!"
please give me a code to stop timer on end date & open another form (ex: form 3)on that day automatically.
thaks in advance!