本文整理自网络,侵删。
//在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;
相关阅读 >>
Delphi xe [dcc32 fatal error] f2039 could not create output file 问题的解决
更多相关阅读请进入《Delphi》频道 >>