'our temp file was moved from it's temp folder. this is the meat and potatoes...
If LastDroppedFile = DroppedFile Then Exit Sub
LastDroppedFile = DroppedFile
DroppedFolder = PathFromFile(DroppedFile)
Call RecycleFile(DroppedFolder & DroppedFileName)
End If
End Select
End Sub
Public Function PathFromFile(ByVal this As String) As String
PathFromFile = Left(this, InStrRev(this, "\"))
End Function
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call SHNotify_Unregister
Call UnSubClass(hwnd)
End Sub
Private Function IsFile(ByVal Path As String) As Boolean
On Error GoTo hell:
Dim fso
If Right(Path, 1) = "\" Then Path = Left(Path, Len(Path) - 1)
Set fso = CreateObject("Scripting.FileSystemObject")
IsFile = fso.GetFile(Path) <> ""
hell:
Set fso = Nothing
End Function
Private Sub lvw_OLECompleteDrag(Effect As Long)
If DroppedFolder = "" Then Exit Sub
Call MsgBox("The target folder you dragged your listitem to is:" & vbCrLf & vbCrLf & DroppedFolder & vbCrLf & vbCrLf & "From here, you can do whatever you want with it. For example, if you write an FTP client, you can transfer a file to this folder. This is just one useful example...", vbInformation, "DroppedFolder")
'cleanup
DroppedFolder = ""
'DroppedFile = ""
'DroppedFileName = ""
TempFile = ""
TempFileName = ""
End Sub
Private Sub lvw_OLESetData(Data As MSComctlLib.DataObject, DataFormat As Integer)
Data.Files.Add CreateTempFile
End Sub
Private Sub lvw_OLEStartDrag(Data As MSComctlLib.DataObject, AllowedEffects As Long)
DroppedFolder = ""
AllowedEffects = vbDropEffectMove Or vbDropEffectCopy
Data.SetData , 15
End Sub
Private Function IsWinVistaIDE() As Boolean
On Error Resume Next
'returns True if running Windows Vista
Dim osv As OSVERSIONINFO
osv.OSVSize = Len(osv)
If GetVersionEx(osv) = 1 Then
If (osv.PlatformID = VER_PLATFORM_WIN32_NT) And (osv.dwVerMajor = 6) Then