- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


Frequently Asked Questions

Using an AVI file with TAnimate

Question:

How can I resource an AVI so the TAnimate control doesn't have to rely upon an external file?

Answer:

There is an AVI Type, which is not used often, called 'AVI' and 

if you create a .RES file, Resource file, with this type it will 

allow you to use the resource as an AVI. 



The steps are:

  1. Create a new RES file. (Resource Workshop is good but it must be a 32-bit resource file)
  2. Add the AVI to the RES Project as a New Type specified as 'AVI'. (ie File | "Add to project..." in Resource Workshop and followed by clicking on the "New Type" button) NOTE:Make sure to edit the Name of the Resource (from 'AVI_1') to a more meaningful name before saving the project. (maybe 'About') - case sensitive.
  3. Save the RES Project to a name (ie RORY.RES)
  4. Back in Delphi 3, add the RES file in with the $R Compiler directive (ie {$R 'C:\AVI\RORY.RES'} )
  5. Programmatically, set the TAnimate's RESName property to the Resource name. (Not the Type; AVI)
Example: Animate1.RESName := 'About'; Animate1.Active := True;



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile