That is interesting as it doesn't *seem* slower here. I haven't actually
tested this, but it seems very similar to the OS copy.
By OS, I mean, if you were to pick up a file with your mouse, copy, then
paste.
This is a snippet from the code I placed in a thread. See the dstream.Write
sstream.Read(8192) line:
/////////////////
// Copy
If AbortThread = False then
While sstream.EOF=False
wnMain.ProgressBar1.Maximum =
wnMain.ProgressBar1.width
dstream.Write sstream.Read(8192) //<-- Raising
the number here could speed up things for you, but not sure of the
ramifications.
wnMain.ProgressBar1.Value = (dstream.Length /
sstream.Length) * wnMain.ProgressBar1.Maximum
// Format byte string for viewing.
bytesCopied = dstream.Length
bytesFull = sourceSize
If bytesCopied > 1048576 then
byteStrCopied = format(bytesCopied / 1048576,
"0.0") + " MB"
ElseIf bytesCopied > 1024 then
byteStrCopied = format(bytesCopied / 1024, "0")
+ " KB"
Else
byteStrCopied = format(bytesCopied, "0") + "
Bytes"
End If
If bytesFull > 1048576 then
byteStrFull = format(bytesFull / 1048576, "0.0")
+ " MB"
ElseIf bytesFull > 1024 then
byteStrFull = format(bytesFull / 1024, "0") + "
KB"
Else
byteStrFull = format(bytesFull, "0") + " Bytes"
End If
wnMain.stCurrentFileName.Text = "File: " +
currentFile.Name
wnMain.stCurrentBytes.Text = "Transfer: " +
byteStrCopied + " of " + byteStrFull + " copied..."
//
Wend
End If
sstream.Close
dstream.Close
wnMain.ProgressBar1.Value = 0
wnMain.stCurrentFileName.Text = "File:"
wnMain.stCurrentBytes.Text = "Transfer:"
/////////////////
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>