none
Change System DateTime format RRS feed

  • Question

  •  

    Hi All:

     

     

    Anyone know how i can chage the system datetime format and/or language in windows mobile 5.0 using API code??

     

    thanks;

    Tuesday, February 19, 2008 1:38 PM

Answers

  • I solved my problem

    I used for changing language

     

    [DllImport("coredll.dll")]

    private static extern uint SetUserDefaultLCID(uint Locale);

     

     

     

     

     

    Wednesday, February 20, 2008 1:55 PM

All replies

  •  

    Hi Again

    I solved the change if datetime format by using the following code, but i still can't change the language of the regional settings any one can help??

     

     

    public const int LOCALE_SSHORTDATE = 0x1F;

    public const int LOCALE_SDATE = 0x1D;

     

    [DllImport("coredll.dll")]

    static extern bool SetLocaleInfo(uint Locale, uint LCType, string lpLCData);

    [DllImport("coredll.dll")]

    private static extern uint GetUserDefaultLCID();

     

     

    in the button event

     

    uint lngLCID;

    lngLCID = GetUserDefaultLCID();

    SetLocaleInfo(lngLCID, LOCALE_SSHORTDATE, "yyyy/MMM/dd");

    SetLocaleInfo(lngLCID, LOCALE_SDATE, "/");

     

     

    -------------------------------------------------------------------------------------------------------

     

    i'm trying use the following code for language

     

    public const int LOCALE_ILANGUAGE = 0x1;

     

    SetLocaleInfo(lngLCID, LOCALE_ILANGUAGE, "0x401");

     

     

    but it didn't work

    Wednesday, February 20, 2008 9:04 AM
  • I solved my problem

    I used for changing language

     

    [DllImport("coredll.dll")]

    private static extern uint SetUserDefaultLCID(uint Locale);

     

     

     

     

     

    Wednesday, February 20, 2008 1:55 PM