I'm developing an Windows Forms application using VS.NET 2003 and .NET
Framework 1.1 SP1 on Windows XP SP 1. The application is an MDI application
where the user can make an MDI child form 'floating'.
The child form is made 'floating' by setting its MdiParent property to null
and then setting its Owner property to the parent form like this:
Form form = ActiveMdiChild;
if (form != null)
{
form.MdiParent = null;
form.Owner = this;
}
If the user wants to make the form 'non-floating' again, the MdiParent
property is reset in the child form like this:
MdiParent = Owner;
I experience two problems in the application:
1. When a child form is made 'floating' and then toggled back to
'non-floating', I cannot activate any of the MDI child forms by clicking with
the mouse in the child forms client area (but it works if I click on the
child forms title or border). I found a workaround for this in this newsgroup
(thanks Ying-Shen Yu!).
2. If I set the MdiList property to true for the Window menu in the MDI
parent, I get an unhandled NullReferenceException in Unknown Module after a
child form is toggled to 'floating' and back and then dragging the MDI child
forms around a few times.
Have anybody else experienced these problems? Does anybody has a workaround
for the second issue?
Thanks!
/Markus