当鼠标光标悬停在 Powerpoint 中时为 gif 制作动画

发布于 2024-12-28 17:20:04 字数 83 浏览 1 评论 0原文

我想知道是否有任何方法可以在 Powerpoint 2010 VBA 中编写一个小程序,当鼠标光标悬停在 gif 上时,该程序可以为 gif 制作动画。

I was wondering if there was any way that I could write in Powerpoint 2010 VBA a small program that animates a gif when a mouse cursor is hovered over it.

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

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

发布评论

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

评论(1

为你拒绝所有暧昧 2025-01-04 17:20:04

不完全是这样,但您可以编写一个宏,当您将鼠标悬停在另一个形状上时,使一张图片可见。

因此,添加任何类型的形状,例如,它可能是动画 gif 的非动画版本。将鼠标悬停在“运行宏”上时为其指定“操作”设置:“ShowMe”

首先,将其添加到您的演示文稿中:

Sub ShowMe()
' Edit this to change the slide number as needed and to 
' change "Picture 1" to the actual name of the animated gif
ActivePresentation.Slides(1).Shapes("Picture 1").Visible = True
End Sub

然后使用选择窗格使动画 gif 不可见。

您可以在这两个形状后面放置一个稍大的形状,并将其鼠标悬停操作设置为宏 HideMe,这与 ShowMe 相同,但设置 .Visible = False

当光标悬停在 ShowMe 触发形状上时,anigif 变得可见;当光标从 gif 移开时,它会落在 HideMe 形状上,从而触发第二个宏并再次隐藏 GIF。

Not exactly, but you can write a macro that makes one picture visible when you mouse over another shape.

So add a shape of any sort, it might be a non-animated version of the animated gif, for example. Assign it an Action setting on mouseover of Run Macro: ShowMe

First, add this to your presentation:

Sub ShowMe()
' Edit this to change the slide number as needed and to 
' change "Picture 1" to the actual name of the animated gif
ActivePresentation.Slides(1).Shapes("Picture 1").Visible = True
End Sub

Then use the selection pane to make the animaged gif invisible.

You could put a slightly larger shape behind both of these shapes and set its mouseover action to the macro HideMe, which is the same as ShowMe but set .Visible = False

When the cursor hovers over the ShowMe trigger shape, the anigif becomes visible; when the cursor moves off the gif, it falls on the HideMe shape which triggers the second macro and hides the GIF again.

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