The Multimedia control allows you to manage Media Control Interface (MCI) devices. These devices include sound boards, MIDI sequencers, audio players, players.This Multimedia control contains a set of push buttons that issue MCI commands which resemble the commands (functions) you would expect to see on a typical compact music player.
Example code:-
Private Sub Form_Load()
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio" 'specifying which type of audio is
MMControl1.FileName = "D:\vb project dtl\Ranjeet\Sounds\Splash.wav" ' path of audio
MMControl1.Command = "Open" ' default open
MMControl1.Command = "Play" ' play command
End Sub
' note that we can use wave nd mp3 files for mmc in visual basic , use wav for better result
we can use mmc to manage the recording and playback of MCI devices.
MCI Commands
Command MCI Command Description
Open MCI_OPEN Opens a MCI device.
Close MCI_CLOSE Closes a MCI device.
Play MCI_PLAY Plays a MCI device.
Pause MCI_PAUSE Pauses playing or recording.
Stop MCI_STOP Stops a MCI device.
Back MCI_STEP steps backward through available tracks.
Step MCI_STEP Steps forward through available tracks.
Next MCI_SEEK Goes to the beginning of the next track (if at last track, goes to the beginning of the last track) using the Seek command.
Seek MCI_SEEK Seeks track forward or backward.
Record MCI_RECORD Records MCI device input.
Eject MCI_SET Ejects Audio CD from CD drive.
Save MCI_SAVE Saves an open file.