OutOfMemoryException
-
We get the following error when we create a new child on our MDI Parent:
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle.
The Code:Dim frmChild As Form = New frmAffiliationRegistration() Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click frmChild.Dispose() frmChild = New frmAdjudicatorRegistration() frmChild.MdiParent = Me frmChild.Enabled = True frmChild.Show() End Sub
Any advice? :confused: -
We get the following error when we create a new child on our MDI Parent:
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle.
The Code:Dim frmChild As Form = New frmAffiliationRegistration() Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click frmChild.Dispose() frmChild = New frmAdjudicatorRegistration() frmChild.MdiParent = Me frmChild.Enabled = True frmChild.Show() End Sub
Any advice? :confused:Heya :) Change your Dim line to this:
Dim frmChild As New frmAffiliationRegistration()
And take the first two lines out of the next block. You only need these three:frmChild.MdiParent = Me frmChild.Enabled = True frmChild.Show()
Beware the chickens, for in their silence, they plot... Life is too short to be taken seriously. -- Oscar Wilde
-
We get the following error when we create a new child on our MDI Parent:
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll Additional information: Error creating window handle.
The Code:Dim frmChild As Form = New frmAffiliationRegistration() Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click frmChild.Dispose() frmChild = New frmAdjudicatorRegistration() frmChild.MdiParent = Me frmChild.Enabled = True frmChild.Show() End Sub
Any advice? :confused:Dim frmChild As Form = New frmAffiliationRegistration() Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click frmChild.Dispose() frmChild= Nothing frmChild = New frmAdjudicatorRegistration() frmChild.MdiParent = Me frmChild.Enabled = True frmChild.Show() End Sub 'Is it Working???