Results 1 to 4 of 4

Thread: change locale using registry

  1. #1
    d_a_r_k is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2010
    Posts
    19
    Reputation
    81

    change locale using registry

    Is it possible to check locale format on form_load and change it to en-us via registry if any other is preset?

  2. #2
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,090
    Reputation
    2804
    You can get/set culture for application (Application.CurrentCulture) or thread (Thread.CurrentThread.CurrentCulture). Culture can also be set for single code calls if necessary, most culture dependent methods has parameters where you can specify culture information. System.Globalization Namespace ()
    These options should be preferable to changing the operating system settings.
    How to format posts with code blocks etc - present the problem/post properly

    Visual Studio Community 2017

  3. #3
    d_a_r_k is offline VB.NET Forum Newbie
    .NET Framework
    .NET 4.0
    Join Date
    Oct 2010
    Posts
    19
    Reputation
    81
    The thing is that I use a complicated way of calculating the progress of an installer. But it errors in some cases, if the decimal sign is nonstandard. So I need a workaround.

  4. #4
    JohnH's Avatar
    JohnH is offline VB.NET Forum Moderator
    .NET Framework
    .NET 4.5
    Join Date
    Dec 2005
    Location
    Norway
    Posts
    15,090
    Reputation
    2804
    Sounds as you should take a closer look at your code. Perhaps you can set the thread culture in an application to debug your problem calls under various cultures.
    How to format posts with code blocks etc - present the problem/post properly

    Visual Studio Community 2017

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •