Results 1 to 2 of 2

Thread: MDI Form

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2001
    Posts
    62

    MDI Form

    Hello to all,

    I have an MDI form. If I opened a child form and then I open another child form, I need to close the first form. I need a routine of clearing out the **first** child form and so on. The problem is everytime I open a child form, I have to unload it and so on. I have to know which child form is opened, then unload all other child forms. Is there a generic routine/code of handling this.


    thanks

  2. #2
    Hyperactive Member Ed Lampman's Avatar
    Join Date
    Mar 2001
    Posts
    273
    The primary purpose for a MDI application is to allow several child forms to be opened at one time. Good examples are Word and Excel.

    To manipulate child forms from within the MDI form, you refer to the MDIForm.ActiveForm property.

    In other words, if you have two child forms open at one time, and on each you have a textbox named Text1, you can retrieve the contents of each textbox with this code:

    strText = MDIForm.ActiveForm.Text1.Text

    Can I ask why you want to use a MDI form if you're only going to allow one child form to be open at one 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