Table of contents
TOC
折叠目录
展开目录

Application.VisioIsIdle 事件 (Visio)Application.VisioIsIdle Event (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

在应用程序清空其消息队列之后,发生此事件。Occurs after the application empties its message queue.

语法Syntax

专用子_表达式__VisioIsIdle( ByVal 应用程序作为 [IVAPPLICATION] )Private Sub expressionVisioIsIdle( **_ByVal app As [IVAPPLICATION]** )

表达式_一个表示应用程序对象的变量。_expression A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
应用程序app必需Required[IVAPPLICATION][IVAPPLICATION]清空了消息队列的 Microsoft Visio 实例。The instance of Microsoft Visio that emptied its message queue.

注解Remarks

Visio 将不断地处理其消息队列中的消息。当其消息队列为空时:Visio continually processes messages in its message queue. When its message queue is empty:

  1. Visio 将执行自己的空闲时间处理。Visio performs its own idle-time processing.

  2. Visio 将告知 Microsoft Visual Basic for Applications 来执行它的空闲时间处理。Visio tells Microsoft Visual Basic for Applications to perform its idle-time processing.

  3. 消息队列仍然为空时,Visio 将触发VisioIsIdle事件。If the message queue is still empty, Visio fires the VisioIsIdle event.

  4. 如果消息队列为空,Visio 将调用WaitMessage ,这是 Microsoft Windows 新消息获取添加到 Visio 消息队列之前不会返回到调用。If the message queue is still empty, Visio calls WaitMessage , which is a call to Microsoft Windows that doesn't return until a new message gets added to the Visio message queue.

客户端程序可以使用VisioIsIdle事件作为信号来执行它自己的后台处理。A client program can use the VisioIsIdle event as a signal to perform its own background processing.

VisioIsIdle事件不等效于标准的计时器事件。需要定期调用的客户端程序应使用标准的计时器技术,因为在哪些 Visio 中的持续时间是空闲 (调用WaitMessage ) 是不可预知。对于只监视 Visio 活动的客户端程序,但是, VisioIsIdle事件可以就足够了,因为直到WaitMessage返回到 Visio 时,不能没有任何 Visio 活动因为VisioIsIdle事件上次触发时间。The VisioIsIdle event is not the equivalent of a standard timer event. Client programs that need to be called on a periodic basis should use standard timer techniques, because the duration in which Visio is idle (calls WaitMessage ) is unpredictable. For client programs that are only monitoring Visio activity, however, the VisioIsIdle event can be sufficient, because until WaitMessage returns to Visio, there cannot have been any Visio activity since the VisioIsIdle event was last fired.

如果您使用 Microsoft Visual Basic 或 Visual Basic for Applications (VBA),则此主题中的语法描述的是一种通用而有效的事件处理方法。If you're using Microsoft Visual Basic or Visual Basic for Applications (VBA), the syntax in this topic describes a common, efficient way to handle events.

如果您想要创建您自己的事件对象,使用添加AddAdvise方法。若要创建一个事件对象,运行加载项,请使用Add方法,应用到事件列表集合。若要创建一个事件对象,该对象接收通知,请使用AddAdvise方法。若要查找您想要创建的事件的事件代码,请参阅事件代码If you want to create your own Event objects, use the Add or AddAdvise method. To create an Event object that runs an add-on, use the Add method as it applies to the EventList collection. To create an Event object that receives notification, use the AddAdvise method. To find an event code for the event you want to create, seeEvent codes.

© 2018 Microsoft