Solved

load resource file

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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

707 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