Regional Settings

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
 
D

Daniel Moth

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

IP 1
Running Program 8
Query Timeout 3
DataGrid Collumn/Cell Color 1
DataGrid 2 1
TextBox 2
DataGrid 2
Tabcontrol 3

Top