Results 1 to 2 of 2

Thread: Regional settings?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Question Regional settings?

    How can I get the windows regional settings like decimal symbol, thousand separator, date separator ...

    regard j

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Use System.Globalization.CultureInfo class
    VB Code:
    1. Dim cult As New System.Globalization.CultureInfo(Application.CurrentCulture.Name, True)
    2.         MessageBox.Show(cult.DateTimeFormat.DateSeparator.ToString)
    With the code above even if the user has overriden the culture specific info in control panel you will get the user setting. This however does not apply to measurment system. For example if you use US a culture and change the measurment system to Metric instead of US, you can not get it by this code cause it shows to you what Culture uses what Measurement system. Anyway you can read that setting from registry.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

Posting Permissions

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



Click Here to Expand Forum to Full Width