[RESOLVED] Getting a list of items contained within a frame
Let's say I had a frame (it'll be an array frame, fraWindow(1) for instance) and I had lblDrag(1), lblResize(1) and lblClose(1) as objects set as within the frame using the LOAD command.
What I basically want is to be able to check *all* elements and generate a list of which elements are contained within fraWindow(1) so that I can unload them all before unloading fraWindow(1) itself...different "windows" will have different items within and I probably could store a list of the items within but I think it would be easier this way :-)
Is there a way I could do this...I guess I would have to check all elements on a form and see what their container is, but I (1) don't know how to do the elements thing *still* and (2) don't know if I can find out the container...is it as simple as "if [item].container = frawindow(1) then unload [item]"?
Re: Getting a list of items contained within a frame
VB Code:
Dim ctl As Control
For Each ctl In Me.Controls
If ctl.Container Is Frame1 Then
' Do Whatever
End If
Next ctl
Re: [RESOLVED] Getting a list of items contained within a frame
Thanks...that's what I was looking for...I couldn't remember what the "for each" thing was although i guess I worked out how to actually recognise that it was the right item :-)