- Home
·
- Miscellaneous
·
- Fixes to Dual Directories. Sorry folks, you need the msvbvm60.dll inside the system folder to run o
Fixes to Dual Directories. Sorry folks, you need the msvbvm60.dll inside the system folder to run o
Fixes to Dual Directories. Sorry folks, you need the msvbvm60.dll inside the system folder to run on Win98. Also there is a modification to
API Declarations
'Update the two sub routines:
Global Copy_Path as String
Rate Fixes to Dual Directories. Sorry folks, you need the msvbvm60.dll inside the system folder to run o
(1(1 Vote))
Private Sub CopyFiles()
List1.Clear
sFile = True
Dim Files() As String
Dim Path As String
Dim i As Long, n As Long
If Form1.ActiveControl = File1 Then
Path = Dir1.Path
Copy_Path = Dir1.Path
If Right(Path, 1) <> "\" Then
Path = Path & "\"
End If
' Build array of files.
With File1
For i = 0 To .ListCount - 1
If .Selected(i) Then
ReDim Preserve Files(0 To n) As String
Files(n) = Path & .List(i)
List1.AddItem Files(n)
n = n + 1
End If
Next i
End With
Else
If Form1.ActiveControl = File2 Then
Path = Dir2.Path
Copy_Path = Dir2.Path
If Right(Path, 1) <> "\" Then
Path = Path & "\"
End If
' Build array of files.
With File2
For i = 0 To .ListCount - 1
If .Selected(i) Then
ReDim Preserve Files(0 To n) As String
Files(n) = Path & .List(i)
List1.AddItem Files(n)
n = n + 1
End If
Next i
End With
End If
End If
End Sub
'---------------------------------------------
Private Sub pasteFile()
Form1.MousePointer = vbHourglass
Dim result As Long
Dim fileop As SHFILEOPSTRUCT
Dim intLoop As Integer
Dim sItem As String
Dim sFlag As Long
If sCopy = True Then
If folderDestination = Copy_Path Then
sFlag = FOF_FILESONLY + FOF_RENAMEONCOLLISION
Else
sFlag = FOF_FILESONLY
End If
For intLoop = 0 To List1.ListCount - 1
sItem = sItem & List1.List(intLoop) & vbNullChar
Next intLoop
With fileop
.hwnd = Me.hwnd
.wFunc = FO_COPY
.pFrom = sItem & vbNullChar & vbNullChar
.pTo = folderDestination & vbNullChar & vbNullChar
.fFlags = sFlag
End With
result = SHFileOperation(fileop)
If result <> 0 Then 'Operation failed
MsgBox result, , "Copy Operation Failed"
Else
If fileop.fAnyOperationsAborted <> 0 Then
MsgBox fileop.fAnyOperationsAborted, , "Operation Aborted"
End If
End If
File1.Refresh
File2.Refresh
'List1.Clear
Undo.Caption = "&Undo Copy"
Form1.MousePointer = vbDefault
End If
If sCut = True Then
For intLoop = 0 To List1.ListCount - 1
sItem = sItem & List1.List(intLoop) & vbNullChar
Next intLoop
With fileop
.hwnd = Me.hwnd
.wFunc = FO_MOVE
.pFrom = sItem & vbNullChar & vbNullChar
.pTo = folderDestination & vbNullChar & vbNullChar
' .fFlags = FOF_MULTIPLEFILES
End With
result = SHFileOperation(fileop)
If result <> 0 Then 'Operation failed
MsgBox result, , "Move Operation Failed"
Else
If fileop.fAnyOperationsAborted <> 0 Then
MsgBox fileop.fAnyOperationsAborted, , "Operation Aborted"
End If
End If
File1.Refresh
File2.Refresh
'List1.Clear
Form1.MousePointer = vbDefault
Undo.Caption = "&Undo Cut"
End If
End Sub
Fixes to Dual Directories. Sorry folks, you need the msvbvm60.dll inside the system folder to run o Comments
No comments yet — be the first to post one!
Post a Comment