在标准工程中添加一个公共对话框和两个按钮即可尝试本例:
OptionExplicit
'删除文件的API
PrivateDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsToBin)AsLong
'清空回收站的API
PrivateDeclareFunctionSHEmptyRecycleBinLib"shell32.dll"Alias"SHEmptyRecycleBinA"(ByValhwndAsLong,ByValpszRootPathAsString,ByValdwFlagsAsLong)AsLong
PrivateTypeToBin
hwndAsLong
wFuncAsLong
pFromAsString
pToAsString
fFlagsAsInteger
fAnyOperationsAbortedAsLong
hNameMappingsAsLong
lpszProgress...[ 查看全文 ]