|
-
Nov 11th, 2000, 01:27 AM
#1
Thread Starter
PowerPoster
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
-
Nov 11th, 2000, 03:22 AM
#2
Hyperactive Member
Total Time - Current Position = Time Remaining
-
Nov 11th, 2000, 11:30 PM
#3
Thread Starter
PowerPoster
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?
-
Nov 11th, 2000, 11:42 PM
#4
Frenzied Member
Well you can get the number of hours using the Mod operator, like this:
Code:
HoursLeft = LengthInSecs Mod 60
and you can get the remainder, the number of seconds left over, using the integer division operator, \, like this:
Code:
RemainderSecs = LengthInSecs \ 60
Hope that's what you're looking for
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|