Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

VB6 FileProgress [2007-12-24 release]

Merri

VB6, XHTML & CSS hobbyist
Joined
Oct 28, 2002
Messages
6,654
This is a VERY simple progress bar control. What it does differently is that it has three useful methods: [tt]FileCopy[/tt], [tt]GetByteArray[/tt] and [tt]GetString[/tt].

[tt]FileCopy[/tt] method returns True if succeeds in coping a file.

[tt]GetByteArray[/tt] method returns the complete file in a byte array.

[tt]GetString[/tt] method returns the file as a string (in the same way you read a regular file).

Reading a file to byte array is optimized with a fake safearray so there is no needless memory movement involved at any point. All file handling is chunked to 64 kB. The progress bar updates automatically when using one of the custom methods. The progress bar has two events: [tt]Change[/tt] and [tt]Progress[/tt]. [tt]Change[/tt] event occurs when the text percentage in the control has been updated. [tt]Progress[/tt] event occurs when a visual change happened.

This progress bar is also very lightweight and fast. It never updates itself if it doesn't need to. [tt]Min[/tt], [tt]Max[/tt] and [tt]Value[/tt] properties are supported so you can use it as a regular progress bar, too.


Have a Merri Chrystmas!
 

Jdsam

New member
Joined
May 12, 2011
Messages
7
Merri, can this be incorporated into a windows vb script that uses FileSystemObject and if so, how do you do it?

Thanks,
JD
 
Top