Thanks for helping a :sign0104:. If I want it to tick backwards would I do this:
B4X:Sub Timer1_tick for n = 60 to 0 [COLOR="Red"]step -1[/COLOR] progressbar1.value = (100 * n) / 60 next End Sub
Dim TheTime as Int
TheTime = 60 'or whatever you want the time to be set at but make sure to set it again when needed throughout the program
Sub Timer_Tick
pbTimeLeft.Progress = (100 * TheTime) / 60
TheTime = TheTime - 1
End Sub
Dim TheTime As Int
Dim tMax As Int
TheTime = 60
tMax = TheTime
...
...
Sub Timer_Tick
pbTimeLeft.Progress = (100 * TheTime) / tMax
TheTime = TheTime - 1
End Sub
Yeah I really like the max variable. Helps make adjusting the timer for other needs simpler. :sign0142: