动画图片 [英] Animating a Picture

查看:74
本文介绍了动画图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在VBA中的表单上滑动图片。它可以预编程或随机更容易。我需要能够看到它以任何给定的速度移动。


感谢您的支持。

How can I make a picture slide across the form in VBA. It can be pre-programmed or random what ever is easier. I need to be able to see it move at any given speed.

Thanks for your support.

推荐答案


如何在VBA中的表单上滑动图片。它可以预编程或随机更容易。我需要能够看到它以任何给定的速度移动。
How can I make a picture slide across the form in VBA. It can be pre-programmed or random what ever is easier. I need to be able to see it move at any given speed.



移动它很简单 - 您可以设置 .Top 和/或 .Left 属性,或者使用 .Move 方法。

Moving it is easy - you can either set the .Top and/or .Left properties, or use the .Move method.



移动它很容易 - 您可以设置。顶部和/或 .Left 属性,或使用 .Move 方法。
Moving it is easy - you can either set the .Top and/or .Left properties, or use the .Move method.



我明白了,但是它移动得太快以至于我看不到它。

I understand but this moves it so fast that I can''t see it happen.



我明白但是这个动作如此之快以至于我看不到它发生。
I understand but this moves it so fast that I can''t see it happen.



您是否尝试过将DoEvents放入循环中?这可能会略有不同。


您也可以调用Sleep函数,它位于API中的某个位置。尝试搜索诸如VB SLEEP之类的术语。在TheScripts上。我认为它允许你让程序进入睡眠状态(基本上,告诉CPU忽略它)达指定的毫秒数。

Have you tried putting a DoEvents in the loop? This might make a slight difference.

You could also invoke the Sleep function, which is somewhere in the API. Try a search for terms such as "VB SLEEP" on TheScripts. I think it allows you to put your program to sleep (basically, tell the CPU to ignore it) for a specified number of milliseconds.


这篇关于动画图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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