SetParent (user32)
Last changed: -158.255.168.220

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Use this to create forms and then place child windows on it.

Sample Code:

SetParent(FindWindow(vbnullstring,"notepad.exe"),me.handle)

Alternative Managed API:

MDIParent and MDIChild do work for interforms.

Documentation
SetParent on MSDN