I need help for background music i have the code but its not constant (continual)

Here's my code :

My.Computer.Audio.Play(My.Resources.NAME OF FILE, audioplaymode.background)

I need the constant (continual) code please..

Thanks in advance

Recommended Answers

All 2 Replies

I was typing your line of code in and the answer flashed itself up. Instead of Background, use the BackgroundLoop instead.

For example:-

My.Computer.Audio.Play("C:\WINDOWS\Media\Windows XP Ding.wav", AudioPlayMode.BackgroundLoop)

I ran this and the sound repeated itself non-stop until I quit the program.

Rob.

commented: Nice. +0

I was typing your line of code in and the answer flashed itself up. Instead of Background, use the BackgroundLoop instead.

For example:-

My.Computer.Audio.Play("C:\WINDOWS\Media\Windows XP Ding.wav", AudioPlayMode.BackgroundLoop)

I ran this and the sound repeated itself non-stop until I quit the program.

Rob.

Thanks so much bro works fine

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.