[.net] C# Properties.Resources

Started by
2 comments, last by Mike.Popoloski 15 years ago
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.
..
Advertisement
bump any ideas on perhaps another method to load mp3 from resources
..
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.

GetManifestResourceStream might help.
Mike Popoloski | Journal | SlimDX

This topic is closed to new replies.

Advertisement