Because I don't like being defeated by myself.
One way is to make a seperate, really tiny executable to do the copying for you.
VB Code:
Public Sub Form_Load() 'assume Command is sent with a * as a delimiter filecopy Mid(Command, 1, InStr(Command, "*") -1), to Mid (Command, InStr(Command, "*") + 1) End Sub
Then in your code, Shell to the Executable, and start your timer
VB Code:
Public Sub CopyMe_Click() ProgressBar.Max = LenB(fileToCopy) Shell("locationOfNewExecutable fileToCopy*newLocation", 6) Timer.Enable = True End Sub Private Sub Timer_Timer() ProgressBar.Value = LenB(newLocation) If ProgressBar.Value = ProgressBar.Max Then: Timer.Enabled = False End Sub
That'll work.




Reply With Quote