Using The Control
The standard toolbox does not list the multimedia
control. You must add the control to your toolbox
window. Press Ctrl + T to display the components dialog
box and select the control labeled Microsoft Multimedia
Control 6.0. Click OK, VB will add the control as
the last tool on your tollbox window. When you add
the Multimedia MCI control to a form at design time,
the control appears on the form as follows:
Figure 20.1
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
disc player or videotape recorder. The multimedia
control is an intelligent control that recognizes
the capibilities of the devices attached to it. Therefore,
the Play button will not be active if you've ejected
a CD from the CD-ROM drive.
The multimedia control supports a property called
DeviceType that, when you initialize it with the device
you want to use (such as the value of CDAudio, which
specifies that you want the multimedia control to
control an audio CD), the multimedia control automatically
enables the correct buttons.
|
The multimedia control automatically
makes all buttons visible but disabled until you
enable one or more of the buttons, or until you
select a DeviceType value that determines the
button collection the multimedia control is to
enable and display. |
The multimedia control includes a (Custom) entry
in the Properties window that you can select to display
a dialog box that simplifies selecting properties.
For example, if you click the Controls tab, the dialog
box page shown in the following figure appears. From
here, you can customize exactly which buttons appear
on the control.
|
You can also check if you want
to disable or enable any button on the control. |
|