Name

FindWindow

Synopsis

Searches for the specified top-level window:

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
		(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Parameters

lpClassName

A string that contains the window class name of the window being searched for

lpWindowName

A string that contains the window name of the window being searched for

Return Value

Returns the hWnd of the first top-level window that matches the criteria. Returns if no windows match the specified criteria. If more than one window is found, it returns the window highest in the Z-order.

Get Subclassing and Hooking with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.