Share via


WindowHandle32 Property [Visio 2003 SDK Documentation]

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

retVal = object**.WindowHandle32**

retVal     Long. The HWND of the object's window.

object     Required. An expression that returns an Application or Window object.

Version added

4.0

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

Applies to | Application object | InvisibleApp object | Window object

See Also | InstanceHandle32 property | WindowHandle32 property