如何检测DateTimePicker的日历打开? [英] How detect DateTimePicker's Calender is opened ?
本文介绍了如何检测DateTimePicker的日历打开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何确定DateTimePicker的Calender下拉列表当前处于打开或关闭状态?
How can I determine the Calender drop-down of DateTimePicker is currently opened or closed ?
推荐答案
您要处理OnDropDown和OnCloseUp事件以及这些事件,控制变量的值,如下所示:
You want to handle the OnDropDown and OnCloseUp events and in those events, control the value of a variable, something like this:
bool m_droppedDown = false;
private void OnDTP_DropDown()
{
m_droppedDown = true;
}
private void OnDTP_CloseUp()
{
m_droppedDown = false;
}
这篇关于如何检测DateTimePicker的日历打开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文