NETCF DateTimePicker控件在硬件上运行的问题

发布于 2024-07-09 03:11:30 字数 135 浏览 13 评论 0原文

我一直在模拟器上开发一个紧凑的框架应用程序,其中一些表单使用 DateTimePickers。 这些在模拟器中工作正常,但是当在硬件上运行时,它们会导致在选择日期时关闭表单。 没有抛出异常...表单只是意外关闭。 有没有人经历过这个或知道如何解决它?

I have been developing a compact framework app on an emulator, and some of the forms use DateTimePickers. These work fine in the emulator, but when running on the hardware they cause the form to close when a date is selected. No exception is thrown...the form just closes unexpectedly. Has anyone experienced this or know how to fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

还在原地等你 2024-07-16 03:11:31

在您的设备和模拟器上,转到:

开始| 设置【系统】| 区域设置 [日期]

,查看两者的短日期、日期分隔符和长日期设置是否相同。 这只是一种猜测,但这是模拟器和至少与日期选择器相关的设备之间可能存在的差异。 如果不同,请尝试将设备设置为与模拟器相同,看看问题是否仍然存在。

On both your device and the emulator, go to:

Start | Settings [System] | Regional Settings [Date]

and see if both have the same settings for Short date, Date Separator and Long date. This is just a guess, but it's one possible difference between the emulator and the device that is at least related to date pickers. If they're different, try setting the device the same as the emulator and see if you still have the problem.

故事未完 2024-07-16 03:11:31

感谢您的建议...但是模拟器和设备上的区域设置是相同的。

我的解决方案是将 DateTimePicker 控件的“ShowUpDown”属性设置为 true,以便禁用弹出日历并允许用户滚动浏览值。 这提供了相同的功能,没有错误,但没有弹出日历那样的视觉吸引力。 如果有人有任何其他想法可以尝试告诉我,否则这就是可行的解决方案。

Thanks for the suggestion...but the regional settings are the same on the emulator and device.

My solution to this was to set the "ShowUpDown" property of the DateTimePicker control to true so as to disable the popup calendar and enable the user to scroll through values. This provides the same functionality without the bug, but doesn't have the visual appeal that the popup calendar does. If anyone has any other ideas for me to try let me know, otherwise this is the working solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文