Busco algo de informacion para eso mismo. Obtener el nombre de la ventana de un proceso.
Si lo que queres es obtener el titulo de la ventana seria algo así:
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Handle As Long
Private Sub Command1_Click()
Dim WinTitle As String
Handle = FindWindow("Notepad", vbNullString)
WinTitle = Space(100)
GetWindowText Handle, WinTitle, Len(WinTitle)
Debug.Print WinTitle
End Sub
Si no podes usar: GetClassInfo, GetClassName
EnumWindows() + GetWindowThreadProcessId() + GetWindowText() + Loop = Solucion
Al final lo hice de la segunda forma.