VB.net 可编程下拉DateTimePicker
嘿,我这里有这段代码:
Call SendMessage(dtPicker.Handle, CB_SHOWDROPDOWN, True, 0&)
这在组合框上运行良好,但在 DateTimePicker 框上似乎不起作用。
可能是什么问题?
谢谢!
大卫
Hey all i have this code here:
Call SendMessage(dtPicker.Handle, CB_SHOWDROPDOWN, True, 0&)
That works fine on comboboxes but doesn't seem to work when it comes to the DateTimePicker box.
What could be the problem?
Thanks!
David
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,那是针对 ComboBox 的。原生 DTP 控件非常巧妙。它支持 DTM_CLOSEMONTHCAL 消息来关闭日历,但没有相应的消息来打开它。你必须做一些丑陋的事情,比如伪造鼠标或键盘输入。后者可能是最好的:
No, that's for a ComboBox. The native DTP control is quite noddy. It supports the DTM_CLOSEMONTHCAL message to close the calendar but doesn't have a corresponding message to open it. You'll have to do something ugly like faking mouse or keyboard input. The latter is probably best: