Thursday, January 30, 2014

Play Mp3 Files In Visual Fundamental 6

Playing MP3 files in VB 6.0.


Visual Basic has internal classes that easily assist you in coding audio applications. Media Player is a Windows application that can be used in Visual Basic to play audio, such as audio files in the MP3 format. Media Player contains DLL (dynamic link libraries), which are included in Microsoft's programming products. This means that you can drag and drop objects that play music without numerous lines of code.


Instructions


1. Open up your Windows project in the Visual Basic editor. Double-click the form to have it open in the design viewer. You need to add the Media Player object to the project since it is not loaded into the toolbar automatically.


2. Right-click on the toolbar and choose the "Add/Remove Items" option. This will open up a new window box with a list of tools. Click on the "COM Components" tab, then go down to the option box entitled "Windows Media Player." Place a check in this the box, then click "OK."


3. Drag and drop the Media Player tool from the toolbar into the Visual Basic form. Input "myMedia" into the "Name" property for the Media Player tool, then double-click on the icon to open the code view.


4. Assign the MP3 music file to the component. The following code will play the song "mySong.mp3" using the Media Player component: Me.myMedia.URL = "mySong.mp3."


5. Press the "F5" key after saving the form. "F5" runs the code in the debugger that tests the application. "F5" is used to make sure that the new code compiles and plays the song within the visual Basic application.









Related posts



    Convert iTunes files to MP3 files so you can play them on on MP3 players other than iPods.Files purchased from iTunes are in a special format that plays only on iPods and on iTunes software. Howev...
    Convert MP3 Format Sound Files to Play in a DVD PlayerWith the onslaught of digital media and the massive amount of songs downloaded from the Internet, one of the most popular formats for music is...
    How Do I Save Music As MP3 Files?Saving music files has become a process as easy as brushing one's teeth. Say you want to save all your music files to a certain format, such as an MP3 file, then t...
    Know which characters to avoid when naming your music files for Windows Media Player.Creating filenames that you can easily identify and remember is an integral part of effectively organizing your...
    Back up CD music files by converting them to MP3s.If you like to listen to your CD library while you're working on the computer but don't want to have to change CDs all the time, you can convert y...