如何将自定义 AVI 与 TAnimate 结合使用?

发布于 2024-12-03 20:03:16 字数 512 浏览 1 评论 0 原文

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

我使用 DelphiDabbler 的 rcdatacreator 程序 成功将 AVI 加载到 .RES 文件中(您必须下载“工作示例”以获取 rcdatacreator。但是,我现在的问题是弄清楚如何从 .RES 中提取 AVI 文件并将其提供给 TAnimate。

我正在使用 Delphi 2010:

在此处输入图像描述

感谢任何帮助。

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.

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.

I am using Delphi 2010:

enter image description here

Any help is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心意如水 2024-12-10 20:03:16

正如 Andreas 提到的(在他现已删除的答案中),您不需要使用外部工具在最新版本的 Delphi 中添加资源。

使用 IDE 菜单中的Project/Resources and Images...。通过浏览到 .AVI 文件所在的文件夹来添加新资源,为其命名,然后在资源类型中键入 AVI。 (它不在列表中,但您可以添加它。)

Delphi Resources Editor

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

// 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;

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.

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.)

Delphi Resources Editor

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;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文