you need to change the flags,
VB Code:
Public Function CopyFolder(ByVal strSource As String, ByVal strDest As String) As Boolean
'=========================================================================================
Dim varFOS As SHFILEOPSTRUCT
With varFOS
[COLOR=DarkRed] [B] .fFlags =FOF_CREATEPROGRESSDLG[/B][/COLOR]
.wFunc = FO_COPY
.pFrom = strSource
.pTo = strDest
End With
Call SHFileOperation(varFOS)
CopyFolder = (varFOS.fAnyOperationsAborted = 0)
End Function
or you can have Various other choices if the dir already exists and you dont want confirmation to replace it then
VB Code:
.fFlags = FOF_NOCONFIRMATION
just use no flags and it give you a progress dialog and ask for confirmation etc.. all defaults.. like this,
VB Code:
Private Declare Function SHFileOperation Lib "shell32.dll" (lpFileOp As SHFILEOPSTRUCT) As Long
Public Function CopyFolder(ByVal strSource As String, ByVal strDest As String) As Boolean
'=========================================================================================
Dim varFOS As SHFILEOPSTRUCT
With varFOS
.wFunc = FO_COPY
.pFrom = strSource
.pTo = strDest
End With
Call SHFileOperation(varFOS)
CopyFolder = (varFOS.fAnyOperationsAborted = 0)
End Function