Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
How To Select Soundcard in Visual Basic with Multimedia Control
Article ID: 180032 - View products that this article applies to.
This article was previously published under Q180032
This article describes how to set the WaveAudio device (soundcard) used by the Multimedia Control (MCI32.ocx) using Visual Basic.
To set the WaveAudio device (soundcard) used by the Multimedia Control, you must use the mciSendCommand API. The Multimedia Control does not directly provide a method to let you set the device used for playing or recording.
The following Visual Basic sample code shows how to use mciSendCommand to specify the device used for WaveAudio output.
Sample CodeFollowing are the required definitions and declarations. Place these in a module file:
Sample CodeThe following code sets the output device. This code assumes that you have a Multimedia Control called "MMControl1." This code should be called after the wave file to be played has been opened by MMControl1.
See the mciSendCommand documentation in the Win32 SDK documentation.