|
|
|
The Microsoft Multimedia Control lets you easily determine the total playing time of an Audio CD: you only need to correctly initialize the control and then decipher the value returned by its Length property. Use the following code as a guideline for your routines: |
Click here to copy the following block | Private Sub cmdDisplayTime_Click() Dim Value As Integer Dim TotalTime As String With MMControl1 .DeviceType = "CDAudio" .TimeFormat = 10 .Command = "Open" Value = (.Length \ 256) And 255 TotalTime = Right$("0" & CStr(Value), 2) & """" Value = (.Length And 255) Mod 60 TotalTime = Right$("0" & CStr(Value), 2) & "' " & TotalTime Value = (.Length And 255) \ 60 If Value > 0 Then TotalTime = CStr(Value) & "h " & TotalTime End If MsgBox TotalTime End With End Sub |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|