| |
| Using an AVI file with TAnimate |
 |
How can I resource an AVI so the TAnimate control doesn't have to rely upon an external file?
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:
Create a new RES file. (Resource Workshop is good but it must be a 32-bit resource file)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_ ') to a more meaningful name before saving the project. (maybe 'About') - case sensitive.
Save the RES Project to a name (ie RORY.RES)Back in Delphi 3, add the RES file in with the $R Compiler directive (ie {$R 'C:\AVI\RORY.RES'} )
Programmatically, set the TAnimate's RESName property to the Resource name. (Not the Type; AVI)
Example:
Animate .RESName := 'About';
Animate .Active := True;
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|