PDA

Click to See Complete Forum and Search --> : Retrieving Windowlist of MDIChild Windows?


Falcondl
Dec 1st, 1999, 09:16 AM
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?

Dec 1st, 1999, 05:17 PM
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

ariad@globalnet.co.uk
http://www.users.globalnet.co.uk/~ariad/

Falcondl
Dec 2nd, 1999, 02:24 AM
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? =(

Serge
Dec 2nd, 1999, 06:38 PM
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
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)