开发者

In C#, monthCalendar update!

Does monthCalendar gets updated automatically at midnight in C#?

Basically, I am using monthCalendar's开发者_如何转开发 DateChanged event, so when I click on a new date in the calendar I get an event happening, but when I had the software open for 48 hours, the calendar didn't update itself automatically and therefore the event didn't work!

Any thoughts would be appreciated.

Jo


DateChanged event occurs when you manually change the date. It won't automatically occur.

You should use something else.

If you want to know the date has changed I have one basic method.

You grab the date of the program start running with DateTime.Now and run a timer every 1 hour or so and whenever the timer is hit, check the date again and compare them. If they are not the same, the day has changed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜