Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change Currency settings in delphi

1,003 views
Skip to first unread message

Faruk Gunes

unread,
Oct 17, 1998, 3:00:00 AM10/17/98
to
Hello everbody,

Currency settings is a global settings in windows.
How can I tell delphi for use my currency settings

Faruk G.
far...@ampyazilim.com.tr

Peter Below

unread,
Oct 18, 1998, 3:00:00 AM10/18/98
to
> Currency settings is a global settings in windows.
> How can I tell delphi for use my currency settings
>
Faruk,

a Delphi program reads the systems locale settings at startup and stores
the values into variables of the Sysutils unit, which are then used for all
the formatting and conversion functions. You can change these variables
inside your program, these changes will only affect your program. The
variables relevant to currencies are

<quote from Sysutils.pas>
CurrencyString - Defines the currency symbol used in floating-point to
decimal conversions. The initial value is fetched from LOCALE_SCURRENCY.

CurrencyFormat - Defines the currency symbol placement and separation
used in floating-point to decimal conversions. Possible values are:

0 = '$1'
1 = '1$'
2 = '$ 1'
3 = '1 $'

The initial value is fetched from LOCALE_ICURRENCY.

NegCurrFormat - Defines the currency format for used in floating-point to
decimal conversions of negative numbers. Possible values are:

0 = '($1)' 4 = '(1$)' 8 = '-1 $' 12 = '$ -1'
1 = '-$1' 5 = '-1$' 9 = '-$ 1' 13 = '1- $'
2 = '$-1' 6 = '1-$' 10 = '1 $-' 14 = '($ 1)'
3 = '$1-' 7 = '1$-' 11 = '$ 1-' 15 = '(1 $)'

The initial value is fetched from LOCALE_INEGCURR.

ThousandSeparator - The character used to separate thousands in numbers
with more than three digits to the left of the decimal separator. The
initial value is fetched from LOCALE_STHOUSAND.

DecimalSeparator - The character used to separate the integer part from
the fractional part of a number. The initial value is fetched from
LOCALE_SDECIMAL.

CurrencyDecimals - The number of digits to the right of the decimal point
in a currency amount. The initial value is fetched from
LOCALE_ICURRDIGITS.

</quote>
Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitely requested!


0 new messages