|
-
Jun 20th, 2002, 08:41 AM
#1
Thread Starter
Lively Member
2 minor Form questions
Hi,
I have to questions:
1 Is there a way to create a MDI child without having to use a
base form.
So what I do now:
Dim Document As New MYMDI()
Document.MdiParent = Me
Document.Show()
and what I'd want to use:
MYMDI.MdiParent = Me
MYMDI.Show()
2 How can I see if a form has allready been loaded?
somethin like:
If Form Is Loaded then
unload Form
EndIf
John
-
Jun 20th, 2002, 01:19 PM
#2
Addicted Member
Question 1.
The form MYMDI in your app is now a class. That is, it is a set of instructions that describes an object. It physically does not exist in memory.
What you need to do is now create a physical instant of your class - an object that actually occupies memory and has its own variables etc. - You do this using
dim frm as new MYDI()
frm is now a living breathing object that exists. - So you have to use the NEW statement that actually creates the object, in memory from the class.
Question 2.
if not (frm is nothing) then
frm.close
end if
The new gabbage collection system now cleans up any memory not used over a period of time.
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
|