First start a new xna window game project. Then add a new "MDI Parent Form" to the project. After that change the code in the Program.cs file to look like this ...
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
using (Game1 game = new Game1())
{
MDIParent1 mainMDIForm = new MDIParent1();
var gameWindow = Control.FromHandle(game.Window.Handle) as Form;
if (gameWindow != null)
{
gameWindow.MdiParent = mainMDIForm;
}
mainMDIForm.Show();
gameWindow.Show();
game.Run();
}
}
Now press F5 to run the application. Voila! You can now proceed to add game editing or other win form controls to the MDI window for what ever you need. But some initial testing raised a few minor issues.
The first one is that once in a while the viewport does not get updated if the game window is resized. There is also a issue where keyboard keys don't work properly if the game window is the active window. To over come this just make sure that after you are finished interacting with the game window to just deactivate the window again. Then you will be able to press Alt-F to bring up the file menu for example.