Reputation: 2305
I've made a .wav file to play from application and added it to Resources folder via Add > Existing Item. However, when I try to do this:
soundPlayer.Stream = Properties.Resources.file;
It says that ProjectName.Properties.Resources doesn't contain definition for file. I've added file to right project and soundPlayer object exists.
Upvotes: 3
Views: 10703
Reputation: 36
You need to reference the file. Ex: myProject.Properties.Resources.fileName (the actual name you have given the file).
Here is more info about adding and editing resources
Upvotes: 2