Sub copyfilewithprogress()
Dim sr As New IO.FileStream(stroldfile, IO.FileMode.Open) 'source file
Dim sw As New IO.FileStream(strnewfile, IO.FileMode.Create) 'target file, defaults overwrite
Dim len As Long = sr.Length - 1
For i As Long = 0 To len
sw.WriteByte(sr.ReadByte)
If i Mod 1000 = 0 Then 'only update UI every 1 Kb copied
ProgressBar1.Value = i * 100 / len
Application.DoEvents()
End If
Next
ProgressBar1.Value = 0
End Sub
http://feiyun0112.cnblogs.com/