FindWindowByClass Method

AutoMate Example

 

Returns the handle of the window that matches a specified class name.

 

Declaration

Function FindWindowByClass (WindowClass As Variant) As Integer

 

Description

Use FindWindowByClass to obtain a handle to the window with the class name specified in WindowClass. The window must be open for this method to be successful. If multiple windows with the specified class name are open, FindWindowByClass will return the handle to the first window it enumerates. The method returns “0” if the window is not found, or it returns a non-zero value (the window handle) if the window is located.