I am a vb beginner .I know how to use multimedia control to listen .wav,.mid files but I want to know how to use multimedia control to listen .mp3 or soundable .avi files .
I'm not sure of this, but I think with MM Control 6.0 you can play .mp3 or .avi. I'm almost sure of this, are you using Microsoft Multimedia Control 6.0?
Hi,
While using the multimedia control we need to set device type e.g.device type=waveaudio for wav files.
But for .mp3 files no device Type is specified in MSDN help.If I am using Device Type=others then I don't hear anything.Also it does't give any error
The code I am writing is as follows:
Private Sub Form_Load ()
' Set properties needed by MCI to open.
MMControl1.Notify = FALSE
MMControl1.Wait = TRUE
MMControl1.Shareable = FALSE
MMControl1.DeviceType = "other"
MMControl1.FileName = "C:\WINDOWS\MMDATA\GONG.mp3"
' Open the MCI WaveAudio device.
MMControl1.Command = "Open"
End Sub
If you want to play mp3 all you need to do is:
MMControl1.Command = "Close" 'To ensure nothing else is playing
MMControl1.FileName = "C:\My Music\anything.mp3"
MMControl1.Command = "Open"
This will work also for .avi. When playing this files you don't need to set the device Type otherwise they won't run.
Hello,
As per your suggestion, if I am writing the above code for .wav ar .mid files,I can listen these files without specifying device type.But it is not working for .mp3 files.It does't give any error but the multimedia control on form remains disabled in case of .mp3 files.
With this code I told you, you still have that problem? Because I've tryed it here and it works ok. If I tryed to set the Device type then the multimedia control would be disabled, but with this code it works fine here on my pc.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.