How to Play MP3s Using MMControl in Visual Basic
- 1). Open a new or existing Visual Basic project. Click "Project" on the menu and select "Components." Scroll down the list and click to put a check in the check box beside "Microsoft Multimedia Control 6.0." Click "OK" to close the Components window. This adds the MMControl to your toolbox.
- 2). Double-click the MMControl in the toolbox to add one to your project. Click and drag it to the location you want it.
- 3). Open the code window. Type "MMControl1.FileName = "path_to_mp3"" in one of your functions, where "path_to_mp3" is the physical location of your MP3 file on your computer.
- 4). Type "MMControl1.Command = "Open"" on the next line. This loads the MP3 file into your control and will enable the playback functions at run time.
- 5). Press "F5" to run your program. Press the "Play" button on the MMControl to play your MP3 file.