Hi,
I can't seem to get the hang of using the windows API function FindWindowLike. I'm trying to use it instead of the exact window title. Does anyone have any experience or thoughts on what I am doing wrong here:
AMAS
I can't seem to get the hang of using the windows API function FindWindowLike. I'm trying to use it instead of the exact window title. Does anyone have any experience or thoughts on what I am doing wrong here:
Code:
Option Explicit
Dim r
Sub test()
Static hWnds() As Variant
Dim hWnd
hWnd = FindWindowLike(hWnds(), 0, "NotePad*", "*", Null)
Debug.Print hWnd
End Sub
Function FindWindowLike(hWndArray() As Variant, ByVal hWndStart As Variant, WindowText As String, Classname As String, ID) As Integer
r = FindWindowLike(hWndArray(), hWndStart, WindowText, Classname, ID)
End Function
AMAS