EmptyRecycle() 清空回收站
//在uses下面引用
function SHEmptyRecycleBinA(Wnd:HWND;str:PChar;WRD:DWORD):Integer;stdcall; external 'SHell32.dll';
{清空回收站}
//调用 EmptyRecycle();
function EmptyRecycle():boolean;
begin
Result:=true;
try
if Application.MessageBox('确定要清空回收站吗?','提示',MB_YESNO) = ID_YES then
SHEmptyRecycleBinA(Application.Handle,'', $7);
except
Result:=false;
end;
end;
begin
Result:=true;
try
if Application.MessageBox('确定要清空回收站吗?','提示',MB_YESNO) = ID_YES then
SHEmptyRecycleBinA(Application.Handle,'', $7);
except
Result:=false;
end;
end;
附件列表