以下代码,我在win2000 下调试通过。万无一失 :)
----------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
var
DefLCID: LCID;
Buffer: array[0..255] of char;
begin
Application.UpdateFormatSettings := True;
StrPCopy(Buffer,'yyyy-MM-dd');
DefLCID := GetThreadLocale;
if SetLocaleInfo(DefLCID,LOCALE_SSHORTDATE,Buffer) then begin
ShortDateFormat := Buffer;
end;
Application.UpdateFormatSettings := False;
end;