Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitlePlay an embedded sound file
KeywordsVB.NET, audio, MIDI, WAV, sound, embedded sound files
CategoriesMultimedia, Software Engineering
 
Thanks to Neil Crosby.

This program uses reflection (System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream) to pull the embedded data out of the executable. For WAVs, it then uses the PlaySound function in winmm.dll to play the sound.

For MIDIs, the program writes the data into a temporary file. It then uses the mciSendString function in winmm.dll to play the file.

See the code for details.

 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated