如何在TAnimate中使用自定义AVI? [英] How do I use a custom AVI with TAnimate?

查看:67
本文介绍了如何在TAnimate中使用自定义AVI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用资源摘录从shell32中提取的AVI文件。我想将其与TAnimate一起使用,但是我不知道如何加载该文件。

I have an AVI file that I pulled from shell32 using Resources Extract. I would like to use this with TAnimate but I can't figure out how to load this file.

我成功地使用 DelphiDabbler的rcdatacreator程序(您必须下载可行的示例才能获得rcdatacreator。但是,我的问题现在正在研究如何从.RES中提取AVI文件并将其提供给TAnimate。

I succesfully loaded the AVI into a .RES file using DelphiDabbler's rcdatacreator program (you have to download the "worked example" to get rcdatacreator. However, my issue now is figuring out how to extract the AVI file from the .RES and supplying it to TAnimate.

我正在使用Delphi 2010:

I am using Delphi 2010:

感谢您的帮助。

推荐答案

正如安德里亚斯(Andreas)所说(在他现在删除的答案中),您不需要使用

As Andreas mentioned (in his now deleted answer), you don't need to use an external tool to add the resource in recent versions of Delphi.

使用 Project / Resources and Images ... 从外部工具在最新版本的Delphi中添加资源。

Use Project/Resources and Images... from the IDE menu. Add a new resource by browsing to the folder your .AVI file is in, give it a name, and type in AVI for the Resource Type. (It's not in the list, but you can add it.)

在运行时,使用以下代码:

At runtime, use the following code:

// I used CoolAVI as the resource name in my image above,
// so that's the name I need to use here.
Animate1.ResName := 'COOLAVI';
Animate1.Active := True;

这篇关于如何在TAnimate中使用自定义AVI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆