Accessing all forms

Hi,

I am new to Windows forms development.
How do i access all open/active/non-active forms within my current aplplication   is there a pointer to those items or do i have to maintain it myself 

Thanks,
Udi


Answer this question

Accessing all forms

  • Scott Conrad

    If you are not using MDI (in mdi the parents Mdichildren will have all the forms open). Then the best way is to make a collection and add the forms to that collection.
  • Mark q jones

    The main form of your application form the container of all you programs forms, from that main container a tree like structure is formed in the "controls" container moving up and down that tree the various forms can communicate, several options do exist to accomplish this some of which I (and others) already discussed on this forum.
    In principle everething is maintained for you, however sometimes it might be prudent to add extra pointers to some objects to make coding somewhat simpler

    Note some object use other containers besides "Controls", comboboxes use the  "items"  container to hold the selectable objects, see the help on the various objects for details.

    hope this note is of help!

  • Accessing all forms