473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Country settings

If

a program works with decimal points
the system country setting requires commas as a decimal separator
the number of decimals = 2

then

two positions are added to the numbers when displayed

my question is

how do I stop that from happening?

Patrick.

Nov 15 '05 #1
6 1595
Can you be more specific about what you're trying to do? If you're simply
trying to convert it to a string, then:

float x = 14.95;
string xString = x.ToString("C");

will convert the value to whatever the localized currency format is.

Pete

"Patrick De Ridder" <00@00.00> wrote in message
news:10***************@evisp-news-01.ops.asmr-01.energis-idc.net...
If

a program works with decimal points
the system country setting requires commas as a decimal separator
the number of decimals = 2

then

two positions are added to the numbers when displayed

my question is

how do I stop that from happening?

Patrick.

Nov 15 '05 #2
Hi Patrick,

Check out Application.CurrentCulture property.
You should assign the culture you want and it will affect the application.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rhand.com

"Patrick De Ridder" <00@00.00> wrote in message
news:10***************@evisp-news-01.ops.asmr-01.energis-idc.net...
If

a program works with decimal points
the system country setting requires commas as a decimal separator
the number of decimals = 2

then

two positions are added to the numbers when displayed

my question is

how do I stop that from happening?

Patrick.

Nov 15 '05 #3
Hi Miha,

(I think that there is a 't' missing in your web page address.)

Thank you for your reference.
It lead me to CultureInfo.CurrentUICulture Property in MSDN.

Patrick.
Nov 15 '05 #4
Hi Pete,

No my problem is changing the culture.
I seem to have found a lead on how to do that
(re my other response).

Thanks anyway,
Patrick.

Nov 15 '05 #5
The problem is solved completely now.
Thank you.
Patrick.
Nov 15 '05 #6

"Patrick De Ridder" <wa********@all.here> wrote in message
news:10**************@evisp-news-01.ops.asmr-01.energis-idc.net...
Hi Miha,

(I think that there is a 't' missing in your web page address.)
Aaaargh. Thanks.
Thank you for your reference.
It lead me to CultureInfo.CurrentUICulture Property in MSDN.


Cool.

--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
Nov 15 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: abracad | last post by:
Hi Is there any (preferably free) PHP script that will identify the country of a visitor, thus allowing one page to be delivered to those from A, B and C, and another to those from X, Y and Z? ...
1
by: josepe | last post by:
Greetings, How i can know the country of the visitor of the web? Thanks a lot.
9
by: Lando Chez | last post by:
Hi I need a map of a country on which a region( part of the map) can be clicked ( or on mouseover) causing, on another part of the same page, the appearance of information regarding the region....
2
by: Zyron | last post by:
Hello! I'm developing a web page that has a goal of providing personal content, which means that all information should be written in their own language. I'm about to finish my Geo targeting...
7
by: Lloyd Dupont | last post by:
from the IP of the request ?
3
by: Stefan Richter | last post by:
Following problem: On a german computer system I am developing a program for international computer systems, and I want my programm always to run in the same way. There's a difference in...
1
by: Change your country or language. | last post by:
Change your country or language. --- Posted via www.DotNetSlackers.com
0
by: wv01 | last post by:
Hello, is it possible to change your system country settings with VBA code ? many thanks in advance,
0
by: Bart van Hees | last post by:
I have built an application, which uses some calculations. Digits are in Resources and also within the code. What I noticed: when someone with US settings is using the programm, my variable * 0,3...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.