- 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!
[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!