...set decimal separator systemwide?
Author: Thomas Stutz
procedure SetDecimalSeparator(Ch: Char);
var
DefLCID: LCID;
Buffer: LPSTR;
begin
Application.UpdateFormatSettings := True;
StrPCopy(Buffer, Ch);
DefLCID := GetThreadLocale;
if SetLocaleInfo(DefLCID, LOCALE_SDecimal, Buffer) then
DecimalSeparator := StrPas(Buffer)[1];
Application.UpdateFormatSettings := False;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
SetDecimalSeparator('.');
end;
printed from
www.swissdelphicenter.ch
developers knowledge base