Results 1 to 3 of 3

Thread: [RESOLVED] Getting a list of items contained within a frame

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Resolved [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]"?
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  2. #2
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Getting a list of items contained within a frame

    VB Code:
    1. Dim ctl As Control
    2.     For Each ctl In Me.Controls
    3.         If ctl.Container Is Frame1 Then
    4.             ' Do Whatever
    5.         End If
    6.     Next ctl

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    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 :-)
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

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