Reputation: 157
when I copy the file from one folder to another folder, I want to show the progress bar.
Open Text1.Text For Binary Access Read As FF
filedata = Space(LOF(FF))
Get #1, 1, filedata
Close #FF
Open Text1.Text & ".copy.exe" For Binary Access Write As FF
Put #FF, 1, filedata
Close #FF
How to add Progress Bar for this...
Upvotes: 0
Views: 614
Reputation: 13267
If these files are so large or the drives so slow that it makes any sense to show a progress bar then copy in smaller chunks. If things take that long then you'll be better off handling each chunk prompted by a Timer tick anyway. Update the ProgressBar, etc. each completed tick. In this way you won't need an Evil DoEvents()
call and your UI and program remain responsive to a Cancel button.
Upvotes: 1