Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Latest commit

 

History

History
78 lines (40 loc) · 1.89 KB

invisibleapp-windowhandle32-property-visio.md

File metadata and controls

78 lines (40 loc) · 1.89 KB
title keywords f1_keywords ms.prod api_name ms.assetid ms.date
InvisibleApp.WindowHandle32 Property (Visio)
vis_sdr.chm17514660
vis_sdr.chm17514660
visio
Visio.InvisibleApp.WindowHandle32
251e1a83-3978-a5c9-4d8f-57b74173fda0
06/08/2017

InvisibleApp.WindowHandle32 Property (Visio)

Returns the 32-bit handle of a Microsoft Visio window. Read-only.

Syntax

expression . WindowHandle32

expression A variable that represents an InvisibleApp object.

Return Value

Long

Remarks

The WindowHandle32 property of an Application object returns one of the following:

  • The HWND for the main Visio (frame) window (most common).

  • The HWND for the container application's main frame window if Visio is running in-place and active.

  • 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.

Use the WindowHandle32 property of the Window object to obtain the HWND for a window in the Windows collection of a Visio instance.

You can use the obtained HWND in Windows API calls.

Note Calls to the WindowHandle property (now hidden) are directed to the WindowHandle32 property.

Example

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