Create one class for API call
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class Win32API
{
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern bool ShowWindow(System.IntPtr hWnd, int nCmdShow);
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern System.IntPtr SetParent(System.IntPtr hWndChild, System.IntPtr hWndNewParent);
[DllImport("user32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
public static extern int SetForegroundWindow(System.IntPtr hwnd);
public static bool ShowWindowAPI(System.IntPtr hWnd, int nCmdShow)
{
return ShowWindow(hWnd, nCmdShow);
}
public static System.IntPtr SetParentAPI(System.IntPtr hWndChild, System.IntPtr hWndNewParent)
{
return SetParent(hWndChild, hWndNewParent);
}
}
To load the MDI Form as children
MDIWindowForm frm = new MDIWindowForm();
Win32API.SetParent(frm.Handle, this.Handle);
Win32API.ShowWindow(frm.Handle, 1);