本文整理自网络,侵删。
function RenDirectory(const OldName,NewName:string): boolean;
var
fo: TSHFILEOPSTRUCT;
begin
FillChar(fo, SizeOf(fo), 0);
with fo do
begin
Wnd := 0;
wFunc := FO_RENAME;
pFrom := PChar(OldName+#0);
pTo := pchar(NewName+#0);
fFlags := FOF_NOCONFIRMATION+FOF_SILENT;
end;
Result := (SHFileOperation(fo) = 0);
end;
相关阅读 >>
Delphi firemonkey 学习笔记 �c tpopup 控件的使用
print documents from Delphi - print pdf, doc, xls, html, rtf, docx, txt
Delphi 如何在tmemo,tedit或trichedit中获得插入符的位置
更多相关阅读请进入《Delphi》频道 >>