Regional Settings

  • Thread starter Thread starter David de Passos
  • Start date Start date
D

David de Passos

Hi!
How can set Regional settings in rum-time mode?
For example How can set decimal separator to "." in VB.NET?
--

--


Cumprimentos,
David de Passos
--------------------------------------------------------------
RCSOFT, Lda.
E-Mail: (e-mail address removed)
Móvel: +351 966931639
Telefone: +351 239708708
Fax: +351 239708701
Tel. Directo: +351 239708705 ext. 401
 
The last paragraph in that link shows how to format numbers based on a
decimal point of your choice. That is what you wanted to do isn't it? It
also provides links to CultureInfo which you can explore in the help for
other methods it offers.

I doubt you really want to change locale specifics device-wide while not
changing the language, but you can check this out:
http://msdn.microsoft.com/library/d.../wcesdkr/html/_wcesdk_Win32_SetLocaleInfo.asp

If you describe what you want to achieve maybe we can help further.

Cheers
Daniel
 
Dear David,

You can both get and set your regional options using the culture info of
the executing assembly.

To get the default settings,

Dim cult As CultureInfo
cult = [Assembly].GetExecutingAssembly.GetName.CultureInfo()

And as an example if you want to set the Date seperator

cult.DateTimeFormat.DateSeparator = "."

If you need a new culture info is to be set then,

Dim cult As CultureInfo
cult = New CultureInfo("nl-NL") ' here I have set my settings to Dutch
(Nederlands) as you must provide the regional code as string

And as I have shown above, you can get or set the available attributes as
your wish.

Thank you.
 
Back
Top