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

Application.WindowDeactivate 事件 (发布服务器)Application.WindowDeactivate Event (Publisher)

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

在应用程序窗口失去激活状态时发生。Occurs when the application window is deactivated.

语法Syntax

表达式WindowDeactivate( Wn),expression. WindowDeactivate( Wn, )

表示一个应用程序对象的 _expression_A 变量。_expression_A variable that represents an Application object.

参数Parameters

名称Name必需/可选Required/Optional数据类型Data Type说明Description
WnWn必需Required窗口Window正在被停用的窗口。The window that is being deactivated.

注解Remarks

有关使用应用程序对象事件的信息,请参阅使用应用程序对象的事件For information about using events with the Application object, see Using Events with the Application Object.

示例Example

当停用时,本示例最小化窗口。此代码必须置于类模块中,并且必须正确初始化类的一个实例可以查看此示例的效果。如何做到这一点的指导,请参阅事件的应用程序对象This example minimizes the window when it is deactivated. This code must be placed in a class module, and an instance of the class must be correctly initialized to see this example work; see Using Events with the Application Objectfor directions on how to accomplish this.

Public WithEvents appPublisher as Publisher.Application 

Private Sub appPublisher_WindowDeactivate _ 
 (ByVal Wn As Window) 
 Wn.WindowState = pbWindowStateMinimize 
End Sub

另请参阅See also

概念Concepts

Application 对象Application Object

© 2018 Microsoft