Visual Basic: Multimedia MCI Control

Command Property (Multimedia MCI Control)

See Also   Example   Applies To

Specifies an MCI command to execute. This property is not available at design time.

Syntax

[form.]MMControl.Command[ = cmdstring$]

Remarks

The cmdstring$ argument gives the name of the MCI command to execute: Open, Close, Play, Pause, Stop, Back, Step, Prev, Next, Seek, Record, Eject, Sound, or Save. The command is executed immediately, and the error code is stored in the Error property.

The following table describes each command and lists the properties it uses. If a property is not set, either a default value is used (shown in parentheses following the property name), or the property is not used at all (if no default value is shown).

Command Description/Properties used
Open Opens a device using the MCI_OPEN command.
Notify (False)
Wait (True)
Shareable
DeviceType
FileName
Close Closes a device using the MCI_CLOSE command.
Notify (False)
Wait (True)
Play Plays a device using the MCI_PLAY command.
Notify (True)
Wait (False)
From
To
Pause Pauses playing or recording using the MCI_PAUSE command. If executed while the device is paused, tries to resume playing or recording using the MCI_RESUME command.
Notify (False)
Wait (True)
Stop Stops playing or recording using the MCI_STOP command.
Notify (False)
Wait (True)
Back Steps backward using the MCI_STEP command.
Notify (False)
Wait (True)
Frames
Step Steps forward using the MCI_STEP command.
Notify (False)
Wait (True)
Frames
Prev Goes to the beginning of the current track using the Seek command. If executed within three seconds of the previous Prev command, goes to the beginning of the previous track or to the beginning of the first track if at the first track.
Notify (False)
Wait (True)
Next Goes to the beginning of the next track (if at last track, goes to beginning of last track) using the Seek command.
Notify (False)
Wait (True)
Seek If not playing, seeks a position using the MCI_SEEK command. If playing, continues playing from the given position using the MCI_PLAY command.
Notify (False)
Wait (True)
To
Record Records using the MCI_RECORD command.
Notify (True)
Wait (False)
From
To
RecordMode (0Insert)
Eject Ejects media using the MCI_SET command.
Notify (False)
Wait (True)
Sound Plays a sound using the MCI_SOUND command.
Notify (False)
Wait (False)
FileName
Save Saves an open file using the MCI_SAVE command.
Notify (False)
Wait (True)
FileName

Data Type

String