GetTopLevelWindows Method

Applies to:  WindowSpy
See also:  GetTopLevelWindows method, Windows collection object

Returns a collection of all the currently open top-level windows, including invisible windows.

Syntax:

Set objWindows = GetChildWindows

The GetChildWindows method syntax has these parts:

Part Description
objWindows A Windows collection object which will store the value returned by GetTopLevelWindows

Remarks:

The collection returned by GetTopLevelWindows is a "snapshot" of the currently open top-level windows.  GetTopLevelWindows actually returns the same object each time it is called, but calls Refresh on that object before returning it.

Example:

Displaying a list of open windows 

 

Home Copyright and Disclaimer