I am at present writing binary from a custom resource to a file. However I would like to keep a status bar recording the progress of the writing. Unfortunately this code (has no progress bar):
VB Code:
Dim byteArr() As Byte byteArr = LoadResData(101,"CUSTOM") Open theFile$ For Binary As #1 Put #1, , byteArr Close #1
is 100 times faster (according to GetTickCount) than this code:
VB Code:
Dim byteArr() As Byte Dim i as Integer byteArr = LoadResData(101,"CUSTOM") Open theFile$ For Binary As #1 For i = 0 To Ubound(byteArr) Put #1, , byteArr(i) UpdateStatus Int((i+1)/(Ubound(byteArr)+1)*100) 'update progressbar Next Close #1
I would like to keep a progress bar on the writing, but I cannot have something which is so slow. Any ideas?




Reply With Quote