VB Code:
  1. Declare Auto Function FindWindow Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
  2.  
  3. 'other stuff
  4. 'set WindowText to the window title eg. "Untitled - Notepad"
  5.  
  6. SetParent(FindWindow(vbNullString, WindowText), Panel1.Handle)

You may need to tweak some stuff. vbNullString usually works but try the application name (minus extension) if it doesn't. I don't think it applies in this case but if the second window is already a child, you'll need to use FindWindowEx instead (it has a few extra parameters so look it up on MSDN and/or Pinvoke).