移动文件到回收站
2006-02-27 21:13:39 来源:WEB开发网核心提示:声明:PublicTypeSHFILEOPSTRUCThwndAsLongwFuncAsLongpFromAsStringpToAsStringfFlagsAsIntegerfAnyOperationsAbortedAsLonghNameMappingsAsLonglpszPRogressTitleAsLongEndT
声明:
PublicTypeSHFILEOPSTRUCT
hwndAsLong
wFuncAsLong
pFromAsString
pToAsString
fFlagsAsInteger
fAnyOperationsAbortedAsLong
hNameMappingsAsLong
lpszPRogressTitleAsLong
EndType
PublicDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsSHFILEOPSTRUCT)AsLong
PublicConstFO_DELETE=&H3
PublicConstFOF_ALLOWUNDO=&H40
代码:
DimSHopAsSHFILEOPSTRUCT
DimstrFileasstring
WithSHop
.wFunc=FO_DELETE
.pFrom=strFile Chr(0)
.fFlags=FOF_ALLOWUNDO
EndWith
SHFileOperationSHop->
PublicTypeSHFILEOPSTRUCT
hwndAsLong
wFuncAsLong
pFromAsString
pToAsString
fFlagsAsInteger
fAnyOperationsAbortedAsLong
hNameMappingsAsLong
lpszPRogressTitleAsLong
EndType
PublicDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsSHFILEOPSTRUCT)AsLong
PublicConstFO_DELETE=&H3
PublicConstFOF_ALLOWUNDO=&H40
代码:
DimSHopAsSHFILEOPSTRUCT
DimstrFileasstring
WithSHop
.wFunc=FO_DELETE
.pFrom=strFile Chr(0)
.fFlags=FOF_ALLOWUNDO
EndWith
SHFileOperationSHop->
更多精彩
赞助商链接