I need to create a form that can contain other forms like an mdi parent in Visual Basic .NET on VS2003.
The main form of the app is an MDI form. The container form has to be a mdi child of the main mdi, which means that the container form cannot also be an mdi parent.
The problem is that when you make an MDI child an MDI container you get the following message.
“An unhandled exception of type 'System.ArgumentException' occurred in system.windows.forms.dll
Additional information: A form cannot be both an MDI child and MDI parent.”
Why in the world Microsoft decided to make this impossible makes no sense and is one of the worst limitations in VS.
The main form of my app is frmMDImain, which is a MDI container where the menus, toolbars etc are contained. frmContainer is a MDI child of frmMDImain.
The problem is that I need to open child forms in frmContainer and I cannot set frmContainer as a MDI container due to the above-mentioned defect in VS.
I must therefore find another way of letting frmContainer contain/host other forms as if it was a MDI container. This is my problem.
Has anyone done this before? Any ideas would be appreciated.