Results 1 to 7 of 7

Thread: Children forms in a PictureBox

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Children forms in a PictureBox

    Does anybody know how to do a For...Next with all the children's form in a PictureBox?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    Clear your question:

    Are you using the SETPARENT API thing here or are you just looking to load up the names of the children forms?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I´m using the SetParent API to set its parent. So, I want to know all the forms that "belongs" to a specific Picturebox.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    so??

    I don't know what to try. They don't belong to the picturebox's parent, they don't belong to the picturebox itself... it seems as if they were in a "virtual dimension" How do you know this?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  5. #5
    Megatron
    Guest
    The best way I can think of is to add each form in the picturebox to a collection, before you call setparent on it. Then you can find out which Form is in the PictureBox by looping through the collection.

  6. #6
    Addicted Member
    Join Date
    May 2000
    Location
    Mexico City
    Posts
    242

    Eureka!?

    I don't know why the GetParent function is not working, but if you use the SetParent to re-set the parent window you can compare the value returned with the picturebox' hwnd property. Oh, and then set back its parent to its previous value if the form wasn't a child of the picturebox...

    Nevertheless, I think Megatron's idea is better.
    Live your own life, for you will die your own death.

  7. #7

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Thanks, Megatron... I will load each form in a collection.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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