重绘方法 [英] Repaint Method

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

问题描述

我正在Outlook中编写一个例程来逐步查看邮件。 该例程工作正常,但我遇到了一个我正在运行的useform的问题。 它显示进度并计算每个循环的邮件。 我在每次更新后使用
重绘方法,它似乎运行正常然后突然停止重新绘制。 例程运行正常,完成后再次刷新到完成的进度。 因此,我假设每秒刷新
事件的最大数量为什么。 任何人都可以确认这一点并告诉我它是否可以被覆盖。 谢谢。

I am writing a routine in Outlook which steps through the mails.  The routine works fine but I am having some trouble with a useform I am running on top.  It is displaying the progress and counting off each mail cycled through.  I use the repaint method after each update and it seems to run fine then suddenly it stops repainting.  The routine is running fine and when it finishes it once again refreshes to the completed progress.  I therefore assume there are a maximum number of refresh events per second or something.  Could anyone confirm this and tell me if it can be overridden.  Thank you.

编辑:

似乎没有实际上看起来好像在循环中几秒钟之后Outlook会暂停可视化更新,假设发生了崩溃。 正如我所说的那样,它确实会继续运行并从中消失,但我对
原因和如何使用它感到好奇。

Does not seem to berelated to the repaint at all actually it seems as though after a few seconds in the loop Outlook suspends visual updates presumable assuming a crash.  As I say, it does continue to run and comes out of it but I am curious as to the cause and how to avaid it.

推荐答案

尝试在重绘后立即插入命令DoEvents。强制操作系统进行追赶。
Try inserting the command DoEvents immediately after the repaint. Forces the operating system to catchup.


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

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