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?
Jump to Post
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>)
All 4 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.