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

Check & change decimal separator

181 views
Skip to first unread message

Rosen Marinov

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
Hi,
How can I check and if necessary to change decimal separator
in Windows ?


Thanks,
Rosen Marinov


Olray Dragon

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
On Tue, 27 Jun 2000 12:42:15 +0300, "Rosen Marinov"
<rose...@hotmail.com> wrote:

>Hi,
>How can I check and if necessary to change decimal separator
>in Windows ?

You may not. It's changed by the user using a control panel function.
When you need to change it temporarily in your delphi program use the
following line of code in the initialization of your first unit:

DecimalSeparator := ',';


Bob Villiers

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
Look under Regional Settings in the Control Panel.

If you mean in code (unchecked):

if SysUtils.DecimalSeparator = '.' then SysUtils.DecimalSeparator :=
',';

Bob
---
Sent using Virtual Access 5.01 - download your freeware copy now
http://www.atlantic-coast.com/downloads/vasetup.exe

Bill Todd (TeamB)

unread,
Jun 27, 2000, 3:00:00 AM6/27/00
to
If you want to change the Windows Control Panel setting from code try
posting a message in the winapi newsgroup.

--
Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Rosen Marinov

unread,
Jun 28, 2000, 3:00:00 AM6/28/00
to
Thanks, but I want to change decimal separator for ALL Windows
Applications.

Rosen Marinov

"Bob Villiers" <bob_vi...@lineone.net> wrote in message
news:VA.0000005...@lineone.net...

Earl F. Glynn

unread,
Jun 28, 2000, 3:00:00 AM6/28/00
to
"Rosen Marinov" <rose...@hotmail.com> wrote in message news:395874c8@dnews...

> Hi,
> How can I check and if necessary to change decimal separator
> in Windows ?

Here is a recent post by Peter Below about DecimalSeparator:
http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=624223515

In one application I didn't do what Peter recommended --
I hardcoded some strings with decimal points. I used the following
to replace these decimal points with whatever the DecimalSeparator is:

// 4.00 becomes 4,00 if the DecimalSeparator is a ','
FUNCTION LocalizeFloatString(CONST s: STRING): STRING;
BEGIN
RESULT := s;
IF POS('.', RESULT) > 0
THEN RESULT[POS('.',RESULT)] := DecimalSeparator
END {LocalizeFloatString};

--
efg

Earl F. Glynn E-mail: Earl...@att.net
Overland Park, KS USA

efg's Computer Lab: http://www.efg2.com/Lab

Rosen Marinov

unread,
Jun 28, 2000, 3:00:00 AM6/28/00
to
Thanks, but I want to change decimal separator for ALL Windows
Applications ( in Control Panel ).

Rosen Marinov


"Earl F. Glynn" <Earl...@att.net> wrote in message
news:8jd36u$i8...@bornews.borland.com...

Bob Villiers

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
In article <8jb9ll$4c...@bornews.borland.com>, Bill Todd (TeamB) wrote:
> If you want to change the Windows Control Panel setting from code try
> posting a message in the winapi newsgroup.
>
Is that a WM_HOWDOICHANGEDECIMALSEPARATOR message? Should it be Posted
or Sent?


Samih

unread,
Jul 21, 2000, 3:00:00 AM7/21/00
to
You need to refresh the values of focused window.


Rosen Marinov wrote in message <3959bf49@dnews>...


>Thanks, but I want to change decimal separator for ALL Windows

0 new messages