|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to get DateTime format settings from Control PanelHi everyone,
I'm having difficulties retrieving datetime formats that has been customized in the control pane. I can get the cultureinfo, but I get same settings regardless of what i do in the control panel. Any ideas? Brgds Egil Winther ¨ShipNet AS The CurrentUICulture defaults to the current user UI language settings but
does not reflect the individual settings. You must get and set them manually from HKEY_CURRENT_USER\Control Panel\International and change the CultureInfo object accordingly. Markus Show quote "Egil Winther" <egil.wint***@shipnet.no> schrieb im Newsbeitrag news:e2AQjiplGHA.3576@TK2MSFTNGP04.phx.gbl... > Hi everyone, > > I'm having difficulties retrieving datetime formats that has been > customized in the control pane. > > I can get the cultureinfo, but I get same settings regardless of what i do > in the control panel. > > Any ideas? > > Brgds > Egil Winther > ¨ShipNet AS > > "Markus Kling" <markus.kling@nospam.nospam> wrote in For formatting info you should use CurrentCulture, never CurrentUICulture.news:#zPpBOtlGHA.4512@TK2MSFTNGP04.phx.gbl: > The CurrentUICulture defaults to the current user UI language settings but > does not reflect the individual settings. You must get and set them > manually > from HKEY_CURRENT_USER\Control Panel\International and change the > CultureInfo object accordingly. CurrentUICulture is used for UI language settings (as you mentioned). -- Mihai Nita [Microsoft MVP, Windows - SDK] http://www.mihai-nita.net ------------------------------------------ Replace _year_ with _ to get the real email Thanks guys,
I have tried using the CurrentCulture, but it does not seem to change whatever I do in the control panel. I will try to use the registry setting and see what happens. Brgds Egil Winther ShipNet AS Show quote "Mihai N." <nmihai_year_2***@yahoo.com> wrote in message news:Xns97EC12B31F5A2MihaiN@207.46.248.16... > "Markus Kling" <markus.kling@nospam.nospam> wrote in > news:#zPpBOtlGHA.4512@TK2MSFTNGP04.phx.gbl: > >> The CurrentUICulture defaults to the current user UI language settings >> but >> does not reflect the individual settings. You must get and set them >> manually >> from HKEY_CURRENT_USER\Control Panel\International and change the >> CultureInfo object accordingly. > For formatting info you should use CurrentCulture, never CurrentUICulture. > CurrentUICulture is used for UI language settings (as you mentioned). > > -- > Mihai Nita [Microsoft MVP, Windows - SDK] > http://www.mihai-nita.net > ------------------------------------------ > Replace _year_ with _ to get the real email |
|||||||||||||||||||||||