Pravin Ghadge

Pravin Ghadge

  • 562
  • 2.1k
  • 586.6k

Change System DateFormat Runtime

Dec 8 2010 5:52 AM

I want to change control Panel System Date using C#.net Code.
I have Code
 
private void setTime()
{
RegistryKey reg;

reg=
Registry.Users.OpenSubKey("S-1-5-21-1757981266-861567501-682003330-500\\Control Panel\\International");
if(Convert.ToString(reg)==string.Empty)
{
MessageBox.Show("Blank");
}
else
{
reg.SetValue(
"sShortDate", "dd/MM/yyyy");
reg.SetValue(
"sLongDate", "dd/MM/yyyy");
}
}
 
 
But i dont know how to write registry value
Plz help me out

Answers (2)