If Thread1.Start(Me, "CopyFile", Array As String(sPath, sFile, tPath, tFile)) Then
Timer1.Enabled = True
End If
Sub CopyFile(Path1 As String, File1 As String, Path2 As String, File2 As String)
File.Copy(Path1, File1, Path2, File2)
End Sub
Sub Thread1_Ended(endedOK As Boolean, error As String) 'The thread has terminated. If endedOK is False error holds the reason for failure
Timer1.Enabled = False
If endedOK Then
fx.Msgbox(MainForm, "One file copied Ok", "FileCopy")
Else
fx.Msgbox(MainForm, error, "Oooops")
Log(error)
End If
End Sub