|
-
Jun 8th, 2002, 07:12 AM
#1
Thread Starter
Addicted Member
Get Media Duration
I need a function that will get the duration of a given file in this format: "00:00", the function has to support as many file types as possible and return the data as String.
Thanx in advance for your help. RED
-
Jun 8th, 2002, 07:14 AM
#2
Not NoteMe
What do you mean by 'Get the duration of a file'?
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Jun 8th, 2002, 08:27 AM
#3
Thread Starter
Addicted Member
-
Jun 8th, 2002, 08:37 AM
#4
Frenzied Member
VB Code:
Private Sub Command1_Click()
Dim ret As Double, Mint As Integer, Sec As Integer
MediaPlayer1.FileName = "C:\WINDOWS.000\MEDIA\Mozart's Symphony No. 40.rmi"
ret = MediaPlayer1.Duration
Mint = CInt(ret / 60)
Sec = ret Mod 60
If Len(Sec) > 1 Then
Debug.Print Mint & ":0" & Sec
Else
Debug.Print Mint & ":" & Sec
End If
End Sub
of course works only for media player supported formats
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
-
Jun 8th, 2002, 08:59 AM
#5
Thread Starter
Addicted Member
-
Jun 8th, 2002, 09:06 AM
#6
Frenzied Member
Visit http://www.wotsit.org, read the file headers for all the formats you need and calculate the duration.
"Brothers, you asked for it."
...Francisco Domingo Carlos Andres Sebastian D'Anconia
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
|