How do I show marks on the progress bar?
I am loading a collection of files and I want to show the progress in a progress bar. Just show the overall progress by setting the max value of the progress bar to the total size of all files and setting the current position to the size downloaded so far.
What I would like to do is split the progress bar into segments, with each section representing a different file in the collection.
Is it possible? How should I do it?
source to share
If you know the total download size and know the total download size, then you can simply set the maximum total file size and .Position to the total downloaded so far. No need to worry about how the size is split between files.
Or did you mean you want to tick the progress bar according to the size of each file?
source to share
I think the easiest way is to make a UserControl, drop the ProgressBar on it, override the UserControl OnPaint () and paint your lines.
I think the UserControl will be a little easier to handle than drawing directly on the form. The coordinates are easier to handle and it would be easier to reuse it in another application.
source to share