Results 1 to 4 of 4

Thread: Access all MdiChild form on runtime

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Angry Access all MdiChild form on runtime

    Dear All,

    I am new in C# and writing my very first program in it( A basic notepad).

    Question: How can I access all opened forms (infact MDI child forms) in an MDI application at runtime.

    Thanks.
    Last edited by engineer; Aug 23rd, 2007 at 11:43 AM.
    software engineer

  2. #2
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: Access all MdiChild form on runtime

    Your MdiParent has a property that gets an array of all of its MdiChildren forms:
    http://msdn2.microsoft.com/en-us/lib...en(vs.80).aspx

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2004
    Posts
    237

    Angry Re: Access all MdiChild form on runtime

    Thanks nmadd.
    But what if I want to access Mdi child forms not fron MdiParent form but from one of the child form...

    I will appreciate if you could help.
    software engineer

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Access all MdiChild form on runtime

    Every child has an MdiParent property, so this.MdiParent.MdiChildren gets you access to all the child forms from a child form.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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