[.net] C# Properties.Resources
to load a mp3 file I can do ;
string locName = "atb.mp3";
windowsMediaPlayer.URL = locName;
but if I want to add the mp3 as a resource I cant do:
string locName = Properties.Resources.atb;
how would I load the file from resources I dragged it over to audio but it doesn't seem to work.
IIRC those resources are embedded within the .exe itself, and so you'll need to extract them to files so that you can generate a URL to them.
It's probably easiest to not use Properties.Resources for MP3s in the first place, and instead keep them as loose files.
It's probably easiest to not use Properties.Resources for MP3s in the first place, and instead keep them as loose files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement