[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
Declare Auto Function SetParent Lib "user32" (ByVal hWndChild As IntPtr, _
ByVal hWndNewParent As IntPtr) As IntPtr
None.
None.
Use this to create forms and then place child windows on it.
SetParent(FindWindow(vbnullstring,"notepad.exe"),me.handle)
Me.SuspendLayout()
Dim runProcess As New System.Diagnostics.Process
Dim info As New System.Diagnostics.ProcessStartInfo
info.FileName = "NotePad.exe"
info.WindowStyle = ProcessWindowStyle.Normal
runProcess = Process.Start(info)
SetParent(runProcess.MainWindowHandle, Me.Handle)
Me.ResumeLayout()
MDIParent and MDIChild do work for interforms.