First, what are you trying to accomplish by setting
TopLevel
to
false
? And why are you calling
BringToFront()
? When you create a modeless form, it automatically shows up (it's brought to the front).
Second, it sounds like you don't quite understand the nature of a MDI application, nor the interrelationship between child windows and other forms.
Third, if you're creating a modeless window, It should be done something like this:
public partial class MyForm
{
MyModelessForm m_modelessForm = null;
private void ShowModelessForm()
{
if (m_modelessForm == null)
{
m_modelessForm = new ModelessForm();
}
m_modelessForm.Show();
m_modelessForm.BringToFront();
}
}