使用MonthCalendar捕获月份更改 [英] Capture Month Change with MonthCalendar

查看:76
本文介绍了使用MonthCalendar捕获月份更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在其中一个表单上有MonthCalendar。我发现

DateChanged事件不仅在用户点击新的
日期时被触发,而且还是在他们点击上一个或下个月箭头时触发的/>
(意思是他们点击

的左上角或右箭头中的任意一个)。如果用户更改了月份,它会使我在DateChanged事件中的日期逻辑混乱一些。有人

知道如何抓住这个动作吗?我希望我的代码在

DateChanged例程中如下工作:


如果是MonthNotChanged那么

做某事

其他月份改变了

做点别的事情

结束如果


谢谢,
兰迪

I have a MonthCalendar on one of my forms. I have disovered that the
DateChanged event is triggered not only when the user clicks on a new
date, but also if they click on the Previous or Next Month arrows
(meaning they click on either of the left or right pointing arrows in
the top corner). If the user changes the month, it messes up some of
the date logic that I have in the DateChanged event. Does anybody
know how I can capture this action? I''d like my code in the
DateChanged routine to work like this:

If MonthNotChanged then
Do Something
Else ''month changed
Do something Else
End if

Thanks,
Randy

推荐答案

兰迪,


你试过其他吗?事件,我总是使用TextChanged吗?


Cor
Randy,

Did you try the other events, I use always the TextChanged one?

Cor


我没有在事件列表中看到TextChanged。我查看了其他

事件,但我没有看到更合适的事情。

I don''t see TextChanged in the list of events. I looked at the other
events, but I don''t see anything that is more appropriate.


http:// msdn2 .microsoft.com / zh-CN / lib ... xtchanged.aspx

>我没有在事件列表中看到TextChanged 。我查看了其他

事件,但我没有看到更合适的事情。
>I don''t see TextChanged in the list of events. I looked at the other
events, but I don''t see anything that is more appropriate.


这篇关于使用MonthCalendar捕获月份更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆