Hello, I'm working at a project and I want to add a MP3 song an play it when the program that i made will be started... any ideas?

Recommended Answers

All 4 Replies

Hi,

Try this (in your form or a Module):

Private PlaySound As New System.Media.SoundPlayer

Public Sub PlaySoundFile(ByVal SoundPath As String)
        PlaySound .SoundLocation = SoundPath
        PlaySound .Load()
        PlaySound .Play()
End Sub

Then call it from the Form Load event (or wherever you like):

PlaySoundFile(<path to mp3 here>)

I know this works for wav files so it should be good for mp3s too.

HTH,

Chris.

well...i tried this and doesn't work...i don't know why..... does anyone know some other examples?

yeah...and still doesn't work...i really don't get this...but..can anyone give me other examples..

sincerely,

pettrelutza

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.