Playing a sound from a resource

Posted in: General vb.NET
By
May 15, 2009 - 9:30:57 PM

Step 1;
Import the sound file into the project as a resource

This example uses a file cartcar.wav, which is refered to as cartcar when it is imported.

Step 2;
My.Computer.Audio.Play(My.Resources.cartcar, AudioPlayMode.WaitToComplete)

-or for backgound-
My.Computer.Audio.Play(My.Resources.cartcar, AudioPlayMode.WaitToComplete)



Visitor Comments