Results 1 to 2 of 2

Thread: 2 minor Form questions

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2001
    Location
    Lelystad, Netherlands
    Posts
    73

    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

  2. #2
    Addicted Member
    Join Date
    Nov 2000
    Location
    San Diego - California
    Posts
    251
    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
  •  



Click Here to Expand Forum to Full Width