移动应用程序窗口或调整其大小时,该事件发生。
Private Sub object_WindowSize(ByVal Doc As Document, ByVal Wn As Window)
object 在类模块事件中声明的 Application 类型对象。有关使用 Application 对象事件的详细信息,请参阅使用 Application 对象事件。
Doc 调整其大小的窗口中的文档。
Wn 调整其大小的窗口。
该示例在任何时刻移动 Microsoft Word 应用程序窗口或调整其大小时,显示一条消息。该示例假定在一般声明中声明了一个名为“WordApp”的应用程序变量,并将 Word Application 对象赋给该变量。
Private Sub WordApp_WindowSize(ByVal Doc As Document, _
ByVal Wn As Window)
MsgBox "You have just resized or moved your window."
End Sub