GetTopWindowHandle

Windows management function.

The GetTopWindowHandle function returns the handle of the window which is on top; this handle can then be used in Windows API functions or with UseWindowHandle (gives title independence).

Syntax

handle=GetTopWindowHandle()

Parameters

None

Return value

handle : integer, handle of the window which is on top.

See also

GetFocusWindowHandle, UseWindowHandle, GetWindowName$

Examples

 

shell("wordpad.exe")

pause 2

a=GetTopWindowhandle()

msgbox(a)

a returns WordPad top window's handle.