Reputation: 364
I know my question is quite strange but maybe I can found a solution here. I usually want to change some things in Customize Format but I have to go to so many steps:
Is there any way to do this just by one click? I have some knowledge to use Visual Studio to write an application. Sorry for my bad English.
Upvotes: 1
Views: 1172
Reputation: 125207
System Level
If you want to change them at system level, you can change values of HKEY_CURRENT_USER\Control Panel\International
using C# or PowerShell.
C# Example
Microsoft.Win32.Registry.SetValue(@"HKEY_CURRENT_USER\Control Panel\International",
"sDecimal", ",");
PowerShell Example
Set-ItemProperty -Path "HKCU:\Control Panel\International" -Name sDecimal -Value ","
Thread Level
If you want to change those values just for your current thread scope, you can set them this way:
var current = System.Threading.Thread.CurrentThread.CurrentCulture;
var culture = System.Globalization.CultureInfo.CreateSpecificCulture(current.Name);
culture.NumberFormat.NumberDecimalSeparator = ",";
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
Upvotes: 1