C
combo cas
Hello,
I have an error message when trying to call a child form from a Mdi
child form. I am trying to keep all forms within the same mdiParent
form.
I get the error:
An unhandled exception of type 'System.ArgumentException' occurred in
system.windows.forms.dll
Additional information: The form that was specified to be the MdiParent
for this form is not an MdiContainer.
this is at line:
frmLookupby.GlobalForm.MdiParent = Me.GlobalForm
I used Ngo Son Duong code in each of my forms. Form1 was the MdiParent.
Form2 was the mdichild and frmLookupby was to be the grandchild form.
#Region " Global Form "
'Copy this Region on every Form you wish to be accessed globally
'Just rename the Form1 to the name of your Form
Private Shared m_GlobalForm As Form1
Public Shared Property GlobalForm() As Form1
Get
If m_GlobalForm Is Nothing OrElse m_GlobalForm.IsDisposed
Then
m_GlobalForm = New Form1()
End If
Return m_GlobalForm
End Get
Set(ByVal Value As Form1 )
m_GlobalForm = Value
End Set
End Property
#End Region
Anyone have an idea what I am doing wrong?
I have an error message when trying to call a child form from a Mdi
child form. I am trying to keep all forms within the same mdiParent
form.
I get the error:
An unhandled exception of type 'System.ArgumentException' occurred in
system.windows.forms.dll
Additional information: The form that was specified to be the MdiParent
for this form is not an MdiContainer.
this is at line:
frmLookupby.GlobalForm.MdiParent = Me.GlobalForm
I used Ngo Son Duong code in each of my forms. Form1 was the MdiParent.
Form2 was the mdichild and frmLookupby was to be the grandchild form.
#Region " Global Form "
'Copy this Region on every Form you wish to be accessed globally
'Just rename the Form1 to the name of your Form
Private Shared m_GlobalForm As Form1
Public Shared Property GlobalForm() As Form1
Get
If m_GlobalForm Is Nothing OrElse m_GlobalForm.IsDisposed
Then
m_GlobalForm = New Form1()
End If
Return m_GlobalForm
End Get
Set(ByVal Value As Form1 )
m_GlobalForm = Value
End Set
End Property
#End Region
Anyone have an idea what I am doing wrong?