VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



send Recycle

by Anonymous (267 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 27th April 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)

send Recycle

Rate send Recycle



     hWnd As Long
     wFunc As Long
     pFrom As String
     pTo As String
     fFlags As Integer
     fAnyOperationsAborted As Long
     hNameMappings As Long
     lpszProgressTitle As String
End Type
Public Declare Function SHFileOperation Lib "shell32.dll" Alias _
     "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
Public Const FO_DELETE = &H3
Public Const FOF_ALLOWUNDO = &H40


Public Sub Recycle(ByVal FileName As String, frm As Form)
     Dim SHFileOp As SHFILEOPSTRUCT
     Dim RetVal As Long
     With SHFileOp
     .hWnd = frm.hWnd
     .wFunc = FO_DELETE
     .pFrom = FileName
     .fFlags = FOF_ALLOWUNDO
     End With
     'Send this poor soul to file hell
     RetVal = SHFileOperation(SHFileOp)
End Sub

Download this snippet    Add to My Saved Code

send Recycle Comments

No comments have been posted about send Recycle. Why not be the first to post a comment about send Recycle.

Post your comment

Subject:
Message:
0/1000 characters