Date Change event c# – The other way
Could not find anything for change of date events in windows. Then after scraching my head lend up in following solution
DateTime dtTime = DateTime.Now;
DateTime dtTomorrow = DateTime.Today.AddDays(1);
long lng = (dtTomorrow.Ticks – dtTime.Ticks) / 10000;
timer1.Interval = (int)lng + 5000;
// here 5000 for next day + 5 sec. so putting it just for the case whenwe lagged in interval and may be date is not changed or so.