-
September 28th, 2011, 03:20 AM
#1
[Windows 7] Change user's regional settings
I was advised to open a new topic in the C# corner
For more information and the prequel, please check out this topic:
http://www.codeguru.com/forum/showthread.php?t=516737
What i want to do is change the regional settings of an user on Windows 7 / Server 2008 (already got it working on 9x).
Thus, this setting:
http://www.jdsoft.nl/_images/setloc.png
It seems you can do this by using the SetLocaleInfo function:
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
But i'm not sure how to do this and how to use the function, can someone steer me into the right direction here?
What i have so far is this:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;
using System.Runtime.InteropServices;
namespace SetSaf6x
{
class Program
{
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
public static extern bool SetLocaleInfo(int Locale, int LCType, string lpLCData);
static void Main(string[] args)
{
//SetLocaleInfo(something, something, "something");
}
}
}
Thank you very much!
-
October 3rd, 2011, 07:12 AM
#2
Re: [Windows 7] Change user's regional settings
*kick* anyone?
It looks like SetLocaleInfo is't the way to go, but i wonder where to look next then.
-
October 3rd, 2011, 12:32 PM
#3
Re: [Windows 7] Change user's regional settings
Generally it isn't advisable for programs to change user settings.
I have to wonder why you feel your program should do this.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|