I am making an mp3 player and I need to know how to count down the time of the song. I already have the length of the song in a label, but it stays the same. How can I make it count down to 0:00 then close the mp3?
Thanks
Printable View
I am making an mp3 player and I need to know how to count down the time of the song. I already have the length of the song in a label, but it stays the same. How can I make it count down to 0:00 then close the mp3?
Thanks
Total Time - Current Position = Time Remaining
how can i format the time? i have the time in seconds and i tried format(LengthInSec, "00:00") but when it got to 60 seconds it just kept counting. It didn't go to 1:00, it went to :61 then :62, etc. How can i fix this?
Well you can get the number of hours using the Mod operator, like this:
and you can get the remainder, the number of seconds left over, using the integer division operator, \, like this:Code:HoursLeft = LengthInSecs Mod 60
Hope that's what you're looking for :)Code:RemainderSecs = LengthInSecs \ 60