How to use progress bar with time? 
Author Message
 How to use progress bar with time?

I'm making a CD player, and it uses MCI calls for most of the basic
player functionality, including the total tracks, total track time,
current track, and elapsed time. I am using the "tmsf" (or something
like that) time format. It returns the total track time in four
different parts, including minutes and seconds. That is good, because
from those, I can get the number of seconds and make that into
"pgbTime.max = XXX" (pgbTime is the progress bar) . But as far as I can
tell, it returns the elapsed time as a single value, and I am not sure
how to deconstruct it into separate integers for minutes and seconds
(for use in "pgbTime.value = XXX").

Can someone tell me how to take the single time variable and turn it
into something usable by a progress bar's .value attribute? Or tell me
how exactly the elapsed time is returned and how to retrieve it's
minutes and seconds? THanks so much!

---===[[[ korpioneven ]]]===---

--
[ http://www.*-*-*.com/ ]

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 How to use progress bar with time?

Quote:

>  Or tell me
> how exactly the elapsed time is returned and how to retrieve it's
> minutes and seconds? THanks so much!

II would recommend using this:

    ' ----
    Dim byteMinutes As Byte
    Dim byteSeconds As Byte
    Dim byteTime As Single

    byteTime = "547"
    byteMinutes = Int(byteTime / 60)
    byteSeconds = Int(byteTime Mod 60)
    MsgBox byteMinutes & " minutes and " & byteSeconds & " seconds"
    ' ---

byteTime contains the number of Seconds, so you could
assign the progress bar value to this variable.

The variables "byteMinutes" and "byteSeconds" contain
the converted values, which you then could
use in your program to display the current time in a
user-friendly way.

Hope That Helps!

Philipp



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Using Progress Bar to track time while an event is being processed

2. Help: Progress Bar code generates Run Time Error 6

3. Progress bar to track db update time

4. File Loading Progress Form with Progress Bar

5. How do I display a progress bar showing progress for database replication

6. How do I display a progress bar showing progress for database replication

7. Progress bar measuring FileCopy progress

8. Progress bar ? using ADO

9. Progress bar ? using ADO

10. Using the Internet Transfer control and StillExecuting property with Progress Bar

11. Using progress bar for copying file

12. using a Progress control within the Status Bar

 

 
Powered by phpBB® Forum Software