Newbie Question About HardCoding A Sound

Simcoder

Well-known member
Joined
Apr 18, 2003
Messages
124
Location
Texas
Im new to VB and I would just like to know how I would hardcode a wav file to the executable. I plan on distrubuting a file but I dont to have to send the sound files in a seperate folder to my clients. I would like it if I could just "save" the file into the executable or something like that, sorta like a bitmap or something, they are always included with the program executable itself. Im new, anyhelp would be appreciated, just explain it as simple as possible. Thanx =D
 
If you have Visual Studio you can open the Solution Explorer and then right click on the second icon down which should be your class name then choose Add, existing item. Choose your wav file then go down to your file and click on it once. You should see its properties. If not right click and choose, Properties. For build action choose embedded recource.

I am not sure if that is what you want to do but the wave file will be in your program. I am not sure, but I think to play it in your program you would have to save it to the hard drive if you do it the way I mentioned above.

I was just thinking about how play music in my programs, so if anyone else posts an answer, I would like to hear it.
 
Back
Top