I am trying to play L1.wav which is in my resources folder. I used to pull images from a resource file using the line btc.Properties.Resources.noImg, which worked fine, but if I try to do the same for the wav file, I get "... does not contain a definition for L1. Its there, great works if i double click on it.How can I make it work?
System.Media.SoundPlayer player = new System.Media.SoundPlayer();
player.SoundLocation = btc.Properties.Resources.L1;
player.play();
Thank.
source
share