本文整理自网络,侵删。
// 取得当前系统的短日期格式;function GetsysDateFormat: string;var sgs: string;begin SetLength(sgs, 12); GetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, Pchar(sgs), 12); Result := string(Pchar(sgs));end;
// 设定系日期格式;procedure SetSysDateFormat(s: string);begin SetLocaleInfo(LOCALE_SYSTEM_DEFAULT, LOCALE_SSHORTDATE, Pchar(s));end;
相关阅读 >>
Delphi winapi: loadstring - 从资源中载入字符串
更多相关阅读请进入《Delphi》频道 >>