Results 1 to 4 of 4

Thread: Retrieving Windowlist of MDIChild Windows?

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    Is there any way to find out what child windows are open in a parent form, or ways to tell when a child form is opened? like some event?

    I dont mean just looking at the windowlist menu, i need to be able to get the program to know each individual mdichild window that's open (without the menu).

    Any Ideas?

  2. #2
    Guest

    Post

    You could try cycling through the Forms collection, checking the MDIChild property.

    For example,

    Dim Frm As Form

    For Each Frm In Forms
    If Frm.MDIChild Then
    'Child processing...
    End If
    Next

    ------------------
    Richard Moss

    [email protected]
    http://www.users.globalnet.co.uk/~ariad/


  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    hmm, ok, say i was making a text editor...
    in mnuNew_Click

    Dim frmNewForm as new frmNewFormTemplate
    frmNewForm.Show

    that would create a bunch of mdichild windows each time you clicked it, but i wouldn't be able to see if they existed by cycling through the form collection like that. How would i do this? =(

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    The best way to achieve this is to create a menu in your MDI form. Lets say you create a menu called Windows. While you're in the Menu editor check the WindowList check box for that menu. It will keep track of the child windows.

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]
    ICQ#: 51055819


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