MDI forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fatima

    MDI forms

    Hi All
    I used following codes to close all of children forms
    for(int i=0;i<this.MdiC hildren.Length; i++)

    {

    this.MdiChildre n[i].Close();

    }

    but it just closes some of them.

    what's your opinion about this problem?

    thx


  • perspolis

    #2
    Re: MDI forms

    use while instead of for
    "Fatima" <atashi@perpd.c om> wrote in message
    news:OQshGFkeFH A.1136@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Hi All
    > I used following codes to close all of children forms
    > for(int i=0;i<this.MdiC hildren.Length; i++)
    >
    > {
    >
    > this.MdiChildre n[i].Close();
    >
    > }
    >
    > but it just closes some of them.
    >
    > what's your opinion about this problem?
    >
    > thx
    >
    >[/color]


    Comment

    • Mark Broadbent

      #3
      Re: MDI forms

      foreach (Forms.Form f in this.MdiChildre n)
      {
      f.Close();
      }

      br,

      Mark.


      "Fatima" <atashi@perpd.c om> wrote in message
      news:OQshGFkeFH A.1136@TK2MSFTN GP12.phx.gbl...[color=blue]
      > Hi All
      > I used following codes to close all of children forms
      > for(int i=0;i<this.MdiC hildren.Length; i++)
      >
      > {
      >
      > this.MdiChildre n[i].Close();
      >
      > }
      >
      > but it just closes some of them.
      >
      > what's your opinion about this problem?
      >
      > thx
      >
      >[/color]


      Comment

      Working...