VB Code:
'This is the API declaration
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
'This code will blindly throw all the hWnd's in a string and display the string
Dim lHwnd As Long
Dim lReply As Long
Dim sHwnds As String
lHwnd = FindWindowEx(0, 0, vbNullString, vbNullString)
Do Until lHwnd = 0
sHwnds = sHwnds & Hex(lHwnd) & " "
lHwnd = FindWindowEx(0, lHwnd, vbNullString, vbNullString)
Loop
MsgBox sHwnds