MS Access:表单计时器控件...我可以用它来设置例程中的时间间隙吗?
只是想知道,如果我在启动屏幕上发生一些图形事件/动画,我可以使用计时器事件来简单地在一小段时间内打破例程。
基本上就像:
-some action events
DoEvents
'some timer interval
-more action code
Just wondering, if I have some graphical events/animation happening on a splash screen, can I use the timer event some how to simply break up the routine for a small amount of time.
basically like:
-some action events
DoEvents
'some timer interval
-more action code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 Windows API 在代码段之间添加暂停。请参阅本页的 sSleep() 过程:使代码进入睡眠状态
Use the Windows API to include a pause between code sections. See the sSleep() procedure at this page: Make code go to Sleep
您可以将表单级别变量
Dim iStep as integer
组合起来,该变量将自动成为静态,并在您的On Timer
过程中,如下所示:You could combine a form level variable
Dim iStep as integer
which will automatically be Static, and in yourOn Timer
proc, something like:在这种情况下,我认为最好通过在开始时将 Now() 存储到变量中来创建自己的计时器,并使用 DateDiff 检查所需的间隔,甚至直接减法,因为日期存储为数字。
Form Fade
从一个非常旧的库中挖掘出来,最近没有进行测试。
表单:
模块:
In this case, I think it would be better to create your own timer by storing Now() to a variable at the start, and checking for the intervals you want with DateDiff, or even straight subtraction, given that dates are stored as numbers.
Form Fade
Dug out of a very old library and not tested recently.
Form:
Module: