更改区域设置 [英] change regional settings

查看:94
本文介绍了更改区域设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望C#应用程序加载后,立即将区域设置的语言选项更改为English(美国).
而且我也想取消选中使用用户帐户控制(UAC)来帮助保护您的计算机"

I want that as soon as the C# application loads,,change the regional setting''s language option to English(United States).
And also I want to uncheck "Use User Account Control(UAC) to help protect your computer"

推荐答案

为什么这样做? 好主意!系统设置应由用户或受用户信任的本地管理员更改,永远没有其他人可以更改.

无论区域设置如何,这都是您的应用程序,应负责正确的行为.顺便说一句,这很容易.不论操作系统中进行了什么设置,所有.NET应用程序都可以在任何区域中工作.为此,您的线程可以为属性CurrentUICultureCurrentCulture分配所需的值,请参见:
http://msdn.microsoft.com/en-us/library/system. threading.thread.currentculture.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system. threading.thread.currentuiculture.aspx [ ^ ].

—SA
Why doing so? Bad idea! The system settings should be changed by the user or local administrators trusted by the user, nobody else, ever.

This is your application that should be responsible for correctly behavior regardless of Regional Settings. By the way, this is easy. All .NET application can work in any culture no matter what is set up in the OS. To do that, your thread(s) can assign desirable value to the properties CurrentUICulture and CurrentCulture, see:
http://msdn.microsoft.com/en-us/library/system.threading.thread.currentculture.aspx[^],
http://msdn.microsoft.com/en-us/library/system.threading.thread.currentuiculture.aspx[^].

—SA


这篇关于更改区域设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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