Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedding files

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am building a cool(if you ask me) program with pics as forms etc. and all I really wanna do to finish it is to add music. I first used the Mediaplayer, but then the user needs to have that same soundfile in the same directory as me, so I thought I should embed it into the program. Unfortunatly I don´t know how to do that or what to use. :-(

Thanks alot in advance!
 
Hi Stoppel,

What you could do is use an TOleContainer. Just add it to
the form add doubleclick on it to add the sound file (I
think it's best to add .wav files to it). You can then play
the sound files by using this line:

OleContainer1.DoVerb(0);

I hope this helps,

BobbaFet Everyone has a right to my opinion.
E-mail me at cwcon@programmer.net
 
You can also use resource files. Just add the file you want into the project, and then extract them at runtime....
Andreas Nordlund
Software developer
 
Hi Norlund
I have always wanted to know more about Resource files, the help's are not very clear mentioning both .RC and .REC files. and use $R to link them /it into a project!.
Do you have any more info on how they work are added to a project etc ?
Steve..


 
Thanks alot for your help! I used resource-files, because it´s very easy...I´m using "RES-Producer" for creating the files and the content of them. That program also shows you what code to add for your program to use the resource-file. Very useful to a beginner for me lol :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top