|
-
Mar 24th, 2002, 07:31 PM
#1
Thread Starter
Fanatic Member
'System.OutOfMemoryException' UGH!
im creating just a simple MDI app and to add a child window i use this code..
Dim NewMDIChild As New Form2()
NewMDIChild.MdiParent = Me
NewMDIChild.Show()
and it worked, but after a bit i got an error
An unhandled exception of type 'System.OutOfMemoryException' occurred in system.windows.forms.dll
Additional information: Error creating window handle.
Now im guessing i am not freeing up my childs after i create and close them, because of the OutOfMemoryException part.
If this is the case, how do i free them when the app closes?
P.S Side question
I would like
Dim NewMDIChild As New Form2()
NewMDIChild.MdiParent = Me
NewMDIChild.Show()
in a module, but if i change the
newmdichild.mdiparent = me to
newmdichild.mdiparent = Form2
it doesnt work, how can i do this?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|