Occurs when the user presses and releases the mouse button over one of the buttons in the Multimedia MCI control.
Syntax
Private Sub MMControl_ButtonClick (Cancel As Integer)
Remarks
Button may be any of the following: Back, Eject, Next, Pause, Play, Prev, Record, Step, or Stop.
Each of the ButtonClick events, by default, perform an MCI command when the user chooses a button. The following table lists the MCI commands performed for each button in the control.
Button | Command |
Back | MCI_STEP |
Step | MCI_STEP |
Play | MCI_PLAY |
Pause | MCI_PAUSE |
Prev | MCI_SEEK |
Next | MCI_SEEK |
Stop | MCI_STOP |
Record | MCI_RECORD |
Eject | MCI_SET with the MCI_SET_DOOR_OPEN parameter |
Setting the Cancel parameter for the ButtonClick event to True prevents the default MCI command from being performed. The Cancel parameter can take either of the following settings.
Setting | Description |
True | Prevents the default MCI command from being performed. |
False | Performs the MCI command associated with the button after performing the body of the appropriate ButtonClick event. |
The body of an event procedure is performed before performing the default MCI command associated with the event. Adding code to the body of the ButtonClick events augments the functionality of the buttons. If you set the Cancel parameter to True within the body of an event procedure or pass the value True as the argument to a ButtonClick event procedure, the default MCI command associated with the event will not be performed.
Note Issuing a Pause command to restart a paused device can end pending notifications from the original Play command if the device does not support the MCI Resume command. The Multimedia MCI control uses the MCI Play command to restart devices that do not support the MCI Resume command. Notifications from the Play command that restarts a paused device cancel callback conditions and supersede pending notifications from the original Play command.