Background: I am using VS.Net 2003 version 7.1.3088 .Net Framework 1.1 Version 1.1.4322 and am using Visual Basic Windows Forms.
I have an MDI form that is the start up project. It is a form that has menu control with 5 main menu containing 10 sub menu items each. In the MDI Form's constructor, I call a procedure to load a global business object which supplies information from my SQL Server 2000 database. In the form load of the MDI form, I load an MDI child form using the syntax:
Private frm as frmMDIChild
Private Sub Form_Load....
frm = new frmMDIChild
frm.MDIParent = Me
frm.Show
End Sub
When I run it, it gets to the line frm.Show and gives me the error:
An unhandled exception of type 'System.OutOfMemoryException' occurred
in system.windows.forms.dll
Additional information: Error creating window handle.
I put a breakpoint in the form load of the mdi child form. It is a form with a tab control with three tabs. These tabs contain around 50-75 controls including labels, text boxes, check boxes, command buttons, and one true db grid. There is also a true db grid below and some more command buttons.
The textboxes and checkboxes in the tab control are bound to the business object created in the load of the mdi form. It does the first 5-10 text boxes just fine. Then it gives the error:
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
If I comment out that line, it just does it on the next one. If I comment out all the rest of the databinding, the form comes up fine. I have checked my memory and I shouldn't be having any memory issues. I have worked with the program trying to not load some objects until I need them, but nothing seems to help. If anyone can give me assistance, I would appreciate it.
Thanks in advance.
I have an MDI form that is the start up project. It is a form that has menu control with 5 main menu containing 10 sub menu items each. In the MDI Form's constructor, I call a procedure to load a global business object which supplies information from my SQL Server 2000 database. In the form load of the MDI form, I load an MDI child form using the syntax:
Private frm as frmMDIChild
Private Sub Form_Load....
frm = new frmMDIChild
frm.MDIParent = Me
frm.Show
End Sub
When I run it, it gets to the line frm.Show and gives me the error:
An unhandled exception of type 'System.OutOfMemoryException' occurred
in system.windows.forms.dll
Additional information: Error creating window handle.
I put a breakpoint in the form load of the mdi child form. It is a form with a tab control with three tabs. These tabs contain around 50-75 controls including labels, text boxes, check boxes, command buttons, and one true db grid. There is also a true db grid below and some more command buttons.
The textboxes and checkboxes in the tab control are bound to the business object created in the load of the mdi form. It does the first 5-10 text boxes just fine. Then it gives the error:
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
If I comment out that line, it just does it on the next one. If I comment out all the rest of the databinding, the form comes up fine. I have checked my memory and I shouldn't be having any memory issues. I have worked with the program trying to not load some objects until I need them, but nothing seems to help. If anyone can give me assistance, I would appreciate it.
Thanks in advance.