I have seen this thing in a program where it has a dotted line like:
- - - - - - - - - - - - - - -
But the dotted line is animated, so it goes one dot like every second, but it stays on the same line. I want to use this as a progress bar in one of the programs I am making, but the thing is I haven't a clue on how it works.

has anybody got a link to a tutorial or the code for this?

any help would be much appreciated.
thanks