I am creating a C# WinForms MDI application. I have a main form which contains 4 other forms inside it. I want to be able to move the child forms outside of the parent form (their FormBorderStyle value is set to sizeable toolbar so that separate windows don't appear on the taskbar for each child window). I am able to accomplish this by using the following code for the main form:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Prototype
{
public partial class MdiParent : Form
{
private FastEyeControl m_ControlForm;
private FastEyeLogWindow m_LogForm;
private FastEyeConfiguration m_ConfigurationForm;
private ROCOrderWindow m_OrderLogForm;
public MdiParent()
{
InitializeComponent();
m_ControlForm = new FastEyeControl();
m_LogForm = new FastEyeLogWindow();
m_ConfigurationForm = new FastEyeConfiguration();
m_OrderLogForm = new ROCOrderWindow();
}
private void MdiParent_Load(object sender, EventArgs e)
{
m_ControlForm.Show(this);
m_LogForm.Show(this);
m_ConfigurationForm.Show(this);
m_OrderLogForm.Show(this);
}
}
}
However, when I minimize the parent form, all child forms get minimized as well (as expected). Is there anyway to prevent any child forms that are outside of the parent window to be minimized when the parent window is minimized? Basically, I want the user to be able to resize and move the individual child forms outside of the parent form if desired (like undocking a toolbar in Visual Studio.NET and placing it in another monitor somewhere). Thanks for your help!