G
Guest
Hi all,
I'm opening a mdichild (Form2) within another mdichild (Form1). In Form1 I
have:
Form2.MdiParent = Me.MdiParent 'No problem here
....
....
If Form2.ShowDialog = DialogResult.OK Then 'I get an error message here.
This is the error: Forms that are not top level forms cannot be displayed as
modal dialog. Remove the form from any parent form before calling ShowDialog.
When I remove:
Form2.MdiParent = Me.MdiParent
Then I don't get error message but the MDIParent value for Form2 is nothing.
I need to assign mdiparent to the form2 and at the same time use ShowDialog.
Does anyone have any suggestions?
Thanks in advance,
Roy
I'm opening a mdichild (Form2) within another mdichild (Form1). In Form1 I
have:
Form2.MdiParent = Me.MdiParent 'No problem here
....
....
If Form2.ShowDialog = DialogResult.OK Then 'I get an error message here.
This is the error: Forms that are not top level forms cannot be displayed as
modal dialog. Remove the form from any parent form before calling ShowDialog.
When I remove:
Form2.MdiParent = Me.MdiParent
Then I don't get error message but the MDIParent value for Form2 is nothing.
I need to assign mdiparent to the form2 and at the same time use ShowDialog.
Does anyone have any suggestions?
Thanks in advance,
Roy