uses
Registry;
var
registry1: TRegistry;
begin
registry1:=tregistry.Create;
registry1.RootKey:=HKEY_CURRENT_USER;
registry1.OpenKey('Control Panel/International',true);
registry1.writestring('sShortDate','yyyy-MM-dd');
registry1.WriteString('sTimeFormat','HH:mm:ss');
registry1.CloseKey;
registry1.Free;
end;
我在工程文件中这样做来保证格式。