Using straight up API's
VB Code:
  1. Option Strict On
  2. Option Explicit On
  3.  
  4. Public Class Form1
  5.     Delegate Function EnumWindProc( _
  6.             ByVal hWnd As Int32, _
  7.             ByVal lParam As Int32) As Boolean
  8.  
  9.     Delegate Function EnumChildWindProc( _
  10.             ByVal hWnd As Int32, _
  11.             ByVal lParam As Int32) As Boolean
  12.  
  13.     Declare Function EnumWindows Lib "user32.dll" ( _
  14.             ByVal lpEnumProc As EnumWindProc, _
  15.             ByVal lParam As Int32) As Boolean
  16.  
  17.     Declare Function EnumChildWindows Lib "user32" ( _
  18.          ByVal hWnd As IntPtr, _
  19.          ByVal lpEnumFunc As EnumWindProc, _
  20.          ByRef lParam As IntPtr) As Int32
  21.     Dim Children As String
  22.  
  23.     Private Function EnumChild( _
  24.          ByVal hWnd As Int32, _
  25.          ByVal lParam As Int32) As Boolean
  26.         Children = Children & "," & hWnd.ToString
  27.         EnumChild = True
  28.     End Function
  29.  
  30.     Private Function EnumWins(ByVal hwnd As Int32, ByVal lParam As Int32) As Boolean
  31.         Dim proc As New EnumWindProc(AddressOf EnumChild)
  32.         Children = String.Empty
  33.         EnumChildWindows(CType(hwnd, IntPtr), proc, IntPtr.Zero)
  34.         MessageBox.Show(hwnd & Convert.ToChar(Keys.Return) & Children)
  35.         EnumWins = True
  36.     End Function
  37.  
  38.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  39.         Dim proc As New EnumWindProc(AddressOf EnumWins)
  40.         EnumWindows(proc, 0)
  41.     End Sub
  42. End Class

Using process class

VB Code:
  1. Option Strict On
  2. Option Explicit On
  3.  
  4. Public Class Form1
  5.     Delegate Function EnumWindProc( _
  6.             ByVal hWnd As Int32, _
  7.             ByVal lParam As Int32) As Boolean
  8.  
  9.     Delegate Function EnumChildWindProc( _
  10.             ByVal hWnd As Int32, _
  11.             ByVal lParam As Int32) As Boolean
  12.  
  13.     Declare Function EnumChildWindows Lib "user32" ( _
  14.          ByVal hWnd As IntPtr, _
  15.          ByVal lpEnumFunc As EnumWindProc, _
  16.          ByRef lParam As IntPtr) As Int32
  17.     Dim Children As String
  18.  
  19.     Private Function EnumChild( _
  20.          ByVal hWnd As Int32, _
  21.          ByVal lParam As Int32) As Boolean
  22.         If Children.Length <> 0 Then
  23.             Children = Children & "," & hWnd.ToString
  24.         Else
  25.             Children = hWnd.ToString
  26.         End If
  27.         EnumChild = True
  28.     End Function
  29.  
  30.     Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  31.         Dim proc As New EnumWindProc(AddressOf EnumChild), i As Int32
  32.         Dim hwnd() As Process = Process.GetProcesses
  33.         For i = 0 To hwnd.GetUpperBound(0)
  34.             Children = String.Empty
  35.             EnumChildWindows(hwnd(i).MainWindowHandle, proc, IntPtr.Zero)
  36.             MessageBox.Show(hwnd(i).ToString & Convert.ToChar(Keys.Return) & Children)
  37.         Next i
  38.     End Sub
  39. End Class
Please, if i have done anything wrong, correct me!