GetAllThreads Method

Applies to:  WindowSpy
See also:  GetTopLevelWindows method, Thread object

Returns a Thread object which represents all the threads on the system.

Syntax:

Set objAllThreads = GetAllThreads

The GetAllThreads method syntax has these parts:

Part Description
objAllThreads A Thread object which will store the value returned by GetAllThreads

Remarks:

The Thread object returned by GetAllThreads is a special case of the Thread object, which is equivalent to calling WrapThread with a ThreadID of 0.

GetAllThreads returns the same object each time it is called, so there is no need to store the return value.

Note that this is a different behaviour from GetTopLevelWindows which returns a collection.

Examples:

Trapping keyboard events

When the user changes windows 

 

Home Copyright and Disclaimer