Solved

load resource file

Posted on 1999-01-13
4
195 Views
Last Modified: 2010-04-06
i want to insert a avi file for the mediaplayer as a resource file. I already managed to make the resource file, but i don´t know, how to load it in the mediaplayer.
Help wanted!
0
Comment
Question by:brausy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1356415
You have to write it to a file then give it to the mediaplayer, like this:

var
  TheStream : TResourceStream;

begin
  TheStream := TResourceStream.Create(Application.Handle, 'THEAVIRESNAME', RT_RCDATA);
  TheStream.SaveToFile('MyAvi.AVI)
  TheStream.Free

  MediaPlayer1.FileName := 'MyAvi.AVI';

etc...

Cheers,

Raymond.
0
 

Author Comment

by:brausy
ID: 1356416
Actually I want to burn the program on Cd so I can´t create a file. And the program can´t fin the resource file - the resource is in ANIMATION and called Animation_1. Help

0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 1356417
Well, you could write it to the windows temp directory. Alernatively, since you're burning a CD why not just put the AVI down as a separate file?

Raymond.
0
 

Author Comment

by:brausy
ID: 1356418
is there no way to start the file from the ram, instead of writing it to disk
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question