How can I get the windows regional settings like decimal symbol, thousand separator, date separator ...
regard j
Printable View
How can I get the windows regional settings like decimal symbol, thousand separator, date separator ...
regard j
Use System.Globalization.CultureInfo class
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.VB Code:
Dim cult As New System.Globalization.CultureInfo(Application.CurrentCulture.Name, True) MessageBox.Show(cult.DateTimeFormat.DateSeparator.ToString)