📄 005.htm
字号:
<HTML><HEAD><meta http-equiv="Content-Type" content="text/html; charset=GB2312"><TITLE>-->DELPHI专题--API应用-->如何把文件删除到回收站中</TITLE>
<META NAME="keywords" CONTENT=" DELPHI专题--API应用 如何把文件删除到回收站中">
<META NAME="description" CONTENT=" - DELPHI专题--API应用 - 如何把文件删除到回收站中">
<style>
<!--
#page {position:absolute; z-index:0; left:0px; top:0px}
.tt3 {font: 9pt/12pt "宋体"}
.tt2 {font: 12pt/15pt "宋体"}
a {text-decoration:none}
a:hover {color: blue;text-decoration:underline}
-->
</style>
</HEAD>
<a href="index2.html">返回</a>
<body text="#000000" aLink=#9900ff link=#006699 vLink=#006699 bgcolor="#FFFFFF" leftmargin="3" topmargin="3" marginheight="3" marginwidth="3">
<TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>
<TR>
<TD class="tt2" bgcolor="#F5F8F8" width="84%"><center><B><FONT style="FONT-SIZE: 16.5pt" COLOR="#FF6666" FACE="楷体_GB2312">如何把文件删除到回收站中</FONT></B></center>
<hr color="#EE9B73" size="1" width="94%">
<p> 例子如下:// Delphi<br>
<br>
program del;<br>
uses ShellApi;<br>
{ 利用ShellApi中: function SHFileOperation(const lpFileOp: TSHFileOpStruct): Integer;
stdcall; }<br>
Var T:TSHFileOpStruct;<br>
P:String;<br>
begin<br>
P:='C:\Windows\System\EL_CONTROL.CPL';<br>
With T do<br>
Begin<br>
Wnd:=0;<br>
wFunc:=FO_DELETE;<br>
pFrom:=Pchar(P);<br>
fFlags:=FOF_ALLOWUNDO<br>
End;<br>
SHFileOperation(T);<br>
End.<br>
<br>
注意:<br>
1. 给出文件的绝对路径名,否则可能不能恢复;<br>
2. MS的文档说对于多个文件,每个文件名必须被#)字符分隔,而整个字符串必须用两个#0结束。
<hr color="#EE9B73" size="1" width="94%">
</TD>
</TR>
</table>
</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -