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!
countdown timer problem!
Re: countdown timer problem!
First of all, yours is not a countdown timer code. It just show the difference between two times. If you need to make a countdown timer, you need a timer control that continuously trigger a function. This is a good tutorial to do this.
Add a Countdown Timer
Add a Countdown Timer
Re: countdown timer problem!
ok,a best article link for me .thanks!