MdiChild form cannot ShowDialog
Posted on 2004-09-07
First, thanks for clicking.
Have a ParentForm - Form1 - have set MidContainer = True
Have a ChildForm - Form2
Have a button on Form1 that has this click event
Dim ChildForm1 As New Form2
ChildForm1.MdiParent = Me
When I run it crashes at ShowDialog with this error
"Forms that are not top level forms cannot be displayed as a modal dialog. Remove the form from any parent form before calling showDialog."
Does anyone know how to get around this error?? Your opinions would be most grateful appreciated.
Please note this is a simple sample application that simulates the issue in my main application that has many child forms within one parent form.