HWND.Value (property)

Syntax

window.Value

Description

The default property of an HWND object that returns a Variant containing a HANDLE to the physical window of an HWND object variable.

Comments

The .Value property is used to retrieve the operating environment–specific value of a given HWND object. The size of this value depends on the operating environment in which the script is executing and thus should always be placed into a Variant variable.

This property is read-only.

Example

This example displays a dialog box containing the class name of Program Manager's Main window. It does so using the .Value property, passing it directly to a Windows external routine.

Declare Sub GetClassName Lib "user" (ByVal Win%,ByVal ClsName$,

    ByVal ClsNameLen%)

Sub Main()

  Dim ProgramManager As HWND

  Set ProgramManager = WinFind("Program Manager")

  ClassName$ = Space(40)

  GetClassName ProgramManager.Value,ClassName$,Len(ClassName$)

  MsgBox "The program classname is: " & ClassName$

End Sub

See Also

HWND (object).

Notes

Under Windows, this value is an Integer.

More information

H