如何在Win XP中更改ShortDate格式 [英] how to change ShortDate Format in Win XP

查看:106
本文介绍了如何在Win XP中更改ShortDate格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Shortdate格式的问题我试过下面的代码它在Win 7中工作但不能在Win XP中工作



i have problem with Shortdate format i have tried below code its working in Win 7 but not working in Win XP

Microsoft.Win32.Registry.SetValue("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", "dd/MM/yyyy")





我的确切要求是我要改变shortDAte格式作为Win XP系统



以上代码正在改变Win 7系统的系统短时间但不能在XP中工作



PLease帮助



MY exact requiremnt is i want change shortDAte Format of as Win XP system

Above Code is Changing the System Short dATe of Win 7 System but not Working in XP

PLease Help

推荐答案

请先阅读我的评论!



看看区域设置 [ ^ ]和 DateTimeFormatInfo [ ^ ]。如果您想使用特定格式更改短日期字符串,请使用 Culture [ ^ ]
Please, read my comment first!

Have a look at Locale[^] and DateTimeFormatInfo[^]. If you want to change short date string using specific format, please use Culture[^]


您可以尝试将给定代码包含在try-catch块中,以便您可以拦截执行期间可能发生的任何问题。



这可能是一个许可问题;但不可能用如此少的细节和诊断元素来确切地说出来。
You could try to enclose given code in a try-catch block, so that you could intercept any problem that could happen during its execution.

It could be a permission problem; but impossible to tell exactly with so few details and diagnostic-elements.


这篇关于如何在Win XP中更改ShortDate格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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