Or QWord...
Normally I just have Min and Max set to 0 and 100, so Position will be the percentage of the task completed (as suggested above).
Notice that, on Windows, the progressbar does not immediately "grow" to the position you set it to: Windows animates it for you.
And setting Position to Max in common use cases (e.g. repeatedly showing the progres oof a file copy) won't show the progressbar ever reaching Max.
As so many have done, I wrote my own custom progressbar.
It does not have a Min or Max nor Position. It only has Percentage as a way of setting the value.
This way it is clear from the start what it is showing and that it is the responsibility of the programmer to calculate the percentage always (no need to adjust Max value all the time).
(And, of course it immediately shows the value you set it to, no interference of Windows.)
Bart