How to get/set current location in windows?

后端 未结 4 956
渐次进展
渐次进展 2021-01-19 14:51

I need to be able to get/set current location in Win 7 (Control Panel -> Regional and Language -> Location):

\"W

相关标签:
4条回答
  • 2021-01-19 15:28

    The data is stored in the registry. You need to overwrite these keys.

    To know where it's stored in the registry reead this article: http://www.windowsitpro.com/article/registry2/jsi-tip-0311-regional-settings-in-the-registry-

    0 讨论(0)
  • 2021-01-19 15:35

    Ok you need to change windows register HKEY_CURRENT_USER\Control Panel\International\Geo and there you need change 'Nation'

    0 讨论(0)
  • 2021-01-19 15:41

    You can use this code

    CultureInfo _CultureInfo = new CultureInfo("ru-RU");                
                Application.CurrentInputLanguage = InputLanguage.FromCulture(_CultureInfo);
                Application.CurrentCulture = _CultureInfo;
    
    0 讨论(0)
  • 2021-01-19 15:41

    Try this: System.Globalization.CultureInfo myCulture = new System.Globalization.CultureInfo("es-ES");

    0 讨论(0)
提交回复
热议问题