Solved

load resource file

Posted on 1999-01-13
4
188 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
  • 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now