
Help with the Multimedia MCI control
I am creating an application that will give me the track information
from an audio cd. I am trying to step thru the tracks to retrieve the
track length. I am using the "Next" command to move to the next
track, but it doesn't always work. Any suggestions? Here is my code:
Dim i As Integer
MCICtl.DeviceType = "CDAudio"
MCICtl.Wait = True
MCICtl.Shareable = False
MCICtl.Enabled = True
MCICtl.Command = "Open
For i = 1 To MCICtl.tracks
MsgBox "Track - " & MCICtl.Track & ", Length - " & _
Format((MCICtl.TrackLength And 255), "00") & ":" & _
Format((MCICtl.TrackLength / 256) And 255, "00")
MCICtl.Command = "Next"
DoEvents
Next i