Board index » delphi » Putting a AVI into the resource file

Putting a AVI into the resource file

How do I put a AVI file into a res file?

Please!

 

Re:Putting a AVI into the resource file


Quote
On Tue, 24 Feb 1998 01:36:27 +0100, "Kb" <kjbra...@online.no> wrote:
>How do I put a AVI file into a res file?

>Please!

1) Define a constant to be used to refer to the AVI:
const
        ID_AVI_FILE = 123; { assign whatever number you want.}
2) Create a resource file XXX.RC. In the file, have the following
line:
        IDS_AVI_FILE AVI someavi.avi
3) Compile the RC file to a RES with the command:
        BRC32 -r XXX.RC
4) Include the resulting XXX.RES file in yoour project:
        {$R XXX.RES}
5) Put a TAnimate component on the form, and assign it a name. In this
example, the AVI is named "AVICLIP".
6) In the form create, add the following, to start the playing of the
AVI clip:
        with AviClip do
        Begin
                ResID := IDS_AVI_FILE;  { Load AVI}
{ THIS NEXT LINE MUST BE AFTER ASSSIGNING RESID}
                ResHandle := hInstance;
                Active := TRUE; { Start palying immmediately}
        End;

That's all there is to it.

Good luck!

David Block
CoStar Corporation

Check out our label printers at www.costar.com

Email:  dblockREM...@costar.com

Other Threads