Question How to get NAMES of WAV resources?

ppsa

Member
Joined
Sep 28, 2008
Messages
13
Programming Experience
10+
I've added a number of wav files as resources in my vb.net forms application project. I can play them, no problem, but I'd like to populate a dropdown with their names. How can I retrieve the names (string values) of the resource files but only the wav ones?

Thanks
 
Add a new resource file to your project (a .resx file) and put only the sounds there, call it for example Sounds.resx.
Make sure the resource file is configured with code generation (access modifier Friend or Public). These resources will then be available through My.Resources.Sounds.

Here's you'll find an example enumerating the resource names using the resources ResourceManager.GetResourceSet: vb.net - How to get the names of all resources in a resource file - Stack Overflow
 
Back
Top