help with progress bar

newbie here, trying to code the progress bar. I can’t figure it out. I downloaded a folder of examples. There is a progress bar in there. Can anyone explain what the timer is doing.

Timer is looping ever x seconds to update the value of the progress bar.

the timer has been set in the ide (visually) to 100 ms

Once you press a button on the example, the button action sets the timer Mode. Which will update the DemoProgress (progressbar) value in the Action event of the timer.

Better yet, a timer (or another task) adds 1 to a variable. In the task, let add 1 to the variable, and the timer will alter the value of the progressbar with the value of the variable.

Another option, outside of threads, is to alter the progressbar.value directly by the task, without a timer.

I would like to make a progress bar that shows % of a file copied. Say the known file size is 500meg. Hit a button to copy the file. every 1 second, get the file size being copied.
If file size is >100meg, set progress bar to 20%,
If file size is >250meg, set progress bar to 50%,
If file size is >450meg, set progress bar to 95%,

should be not too difficult to do, right

[quote=221417:@Shawn Brady]I would like to make a progress bar that shows % of a file copied. Say the known file size is 500meg. Hit a button to copy the file. every 1 second, get the file size being copied.
If file size is >100meg, set progress bar to 20%,
If file size is >250meg, set progress bar to 50%,
If file size is >450meg, set progress bar to 95%,

should be not too difficult to do, right[/quote]

How do you copy ? How do you get the amount copied ?