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

Window.WindowHandle32 属性 (Visio)Window.WindowHandle32 Property (Visio)

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

返回 Microsoft Visio 窗口的 32 位句柄。只读。Returns the 32-bit handle of a Microsoft Visio window. Read-only.

语法Syntax

表达式WindowHandle32expression . WindowHandle32

表达式_一个表示一个窗口对象的变量。_expression A variable that represents a Window object.

返回值Return Value

LongLong

注解Remarks

应用程序对象的WindowHandle32属性返回下列值之一:The WindowHandle32 property of an Application object returns one of the following:

  • (最常见) 的主 (框架) Visio 窗口的 HWNDThe HWND for the main Visio (frame) window (most common).

  • 如果 Visio 运行在位并处于活动状态的容器应用程序的主框架窗口的HWNDThe HWND for the container application's main frame window if Visio is running in-place and active.

  • 模型() 函数,如果任何一个框架窗口的窗口的HWND被禁用 (例如,如果正在运行一个模式对话框)。有关模型的详细信息,请参阅 Microsoft 开发人员网络 (MSDN) 网站上的 Microsoft 平台 SDK。The HWND for the window returned by the GetActiveWindow () function if either frame window is disabled (for example, if a modal dialog box is running). For details about the GetActiveWindow function, see the Microsoft Platform SDK on the Microsoft Developer Network (MSDN) Web site.

Window对象的WindowHandle32属性用于获取Windows集合的 Visio 实例中的窗口的HWNDUse the WindowHandle32 property of the Window object to obtain the HWND for a window in the Windows collection of a Visio instance.

Windows API 的调用中,可以使用获得的HWNDYou can use the obtained HWND in Windows API calls.

请注意 (现在隐藏) 的WindowHandle属性的调用被定向到的WindowHandle32属性。Note Calls to the WindowHandle property (now hidden) are directed to the WindowHandle32 property.

示例Example

以下 Microsoft Visual Basic for Applications (VBA) 宏显示如何获取窗口的 32 位句柄。This Microsoft Visual Basic for Applications (VBA) macro shows how to get the 32-bit handle of a window.


Public Sub WindowHandle32_Example() 

 Dim vsoWindow As Visio.Window 
 Dim lngWindowHandle32 As Long 

 'Get the active window. 
 Set vsoWindow = ActiveWindow 

 'Get the 32-bit handle of the active window. 
 lngWindowHandle32 = vsoWindow.WindowHandle32 

 'Verify that you got the handle. 
 Debug.Print "The active window handle is"; lngWindowHandle32 

End Sub
© 2018 Microsoft