Play Background Music in Sequence

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Play Background Music in Sequence

  1. #1
    Join Date
    May 2008

    Play Background Music in Sequence

    Well I've got five audio files that I want to play in the background of my program one after the other (like a playlist), however, I can only get one to play (which is the last one). I have also tried changing AudioPlayMode.Background to AudioPlayMode.WaitToComplete but with no luck. The music plays correctly but the form does not load. I am trying to find a way to get all five songs to play one after the other in the background of my program.

    Here is the code:

        Private Sub frmStart_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim Music(4) As Object
            Music(0) = "Music1.wav"
            Music(1) = "Music2.wav"
            Music(2) = "Music3.wav"
            Music(3) = "Music4.wav"
            Music(4) = "Music5.wav"
            Dim MusicCount As New Integer
            For MusicCount = 0 To 4
                My.Computer.Audio.Play(Music(MusicCount), AudioPlayMode.Background)
        End Sub
    It would be great if you could use simple terms as I'm a novice when it comes to programming. All help would be greatly appreciated, thanks.

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    I see that this question was answered in another forum. Here is the answer, in case anyone else needs it:
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Play Music in web application.
    By abcat in forum ASP.NET
    Replies: 4
    Last Post: 06-26-2007, 06:24 AM
  2. How to play an audio file?
    By yhx in forum C++
    Replies: 1
    Last Post: 01-29-2007, 06:08 AM
  3. Any advise on editing music with HTML?
    By Joe in forum Architecture and Design
    Replies: 0
    Last Post: 03-12-2003, 04:55 PM
  4. Any advise on editing HTML codes for music?
    By Joe in forum Talk to the Editors
    Replies: 0
    Last Post: 03-12-2003, 04:54 PM
  5. Script for scrolling
    By Mark in forum Web
    Replies: 3
    Last Post: 08-30-2001, 11:45 AM

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

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