visual studio c# resource question

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

i'm new to c# & .net and I have a question: How do I attach a wav
resource to a form (or to a seperate .rc file) and get the resource
identifier so I can use the playsound api?

its a simple request but it seems really obtuse in the visual studio ide.

thanks!
 
1. Add the WAV file to the project
2. Set its Build Action to 'Embedded Resource' in the IDE's Properties
window
3. Build the project and examine the resultant assembly with ILDASM.exe to
figure out the manifest resource name.
4. Use Assembly.GetManifestResourceStream to load the file into memory.
 
Back
Top