Kaip nustatyti „decimal“ skirtuką sistemoje
2009-03-06
Komentavimas išjungtas
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;