DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: How to play mp3s please tell me!

  1. #1
    Rog Guest

    How to play mp3s please tell me!


    Im a newbie to visual basic but i want to know hot to make an mp3 file play
    ive tried using the media player control but it doesnt work how else can
    i do this.Please help

  2. #2
    Norm Cook Guest

    Re: How to play mp3s please tell me!

    This is bare bones. For example you would want to handle the user
    cancelling the commondialog. Use the View|Object Browser to examine many
    more methods, properties & events.

    Option Explicit
    Private Sub Form_Load()
    'don't need to see the player
    MediaPlayer1.Visible = False
    'so it won't start playing when file is loaded
    MediaPlayer1.AutoStart = False
    'only want mp3 files
    CommonDialog1.Filter = "MP3 Files|*.mp3"
    'open the dialog
    CommonDialog1.ShowOpen
    'load the file into the player
    MediaPlayer1.filename = CommonDialog1.filename
    'play it
    MediaPlayer1.Play
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    MediaPlayer1.Stop
    End Sub

    "Rog" <rog2k1@hotmail.com> wrote in message news:3ba09c4b$1@news.devx.com...
    >
    > Im a newbie to visual basic but i want to know hot to make an mp3 file

    play
    > ive tried using the media player control but it doesnt work how else can
    > i do this.Please help




  3. #3
    rog Guest

    Re: How to play mp3s please tell me!


    thanks ill try it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center