如何在组合框中获取操作系统默认日期时间格式 [英] How to get OS default date time format in combo box
本文介绍了如何在组合框中获取操作系统默认日期时间格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
在我的应用程序中,我正在创建一个文化信息页面,我想显示所有日期格式
默认情况下可用在操作系统中。
[例如在Win 7中我们可以看到(控制面板 - >区域和语言 - >短日期)]
请告诉我如何在组合框中获取这些值。
谢谢
解决方案
I自己解决了
对于 每个 customString 在 DateTimeFormatInfo.CurrentInfo.GetAllDateTimePatterns( d c)
cmbDateFormat.Items.Add(customString)
下一步
Hi all
In my application i am creating a Cultural info page where i want to display all date format
available by default in Operating System.
[e.g In Win 7 we can see (Control panel->Region & language->short date)]
Please tell me how to fetch those values in combo box.
Thank you
解决方案
I solved it by myself
For Each customString In DateTimeFormatInfo.CurrentInfo.GetAllDateTimePatterns("d"c) cmbDateFormat.Items.Add(customString) Next
这篇关于如何在组合框中获取操作系统默认日期时间格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文