MdiChild Forms C# question.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fadah
    New Member
    • Mar 2008
    • 9

    MdiChild Forms C# question.

    Hello!

    I wanted to know is there way to check that form is opend with particular name.

    Code:
     
    if(Form.Name == senderName) // How to Check that form whit this name exists
    {
        Form.BringToFront();
    }
    else
    {
        Form = new Form1();
        Form.Show();
    }
    Would be glad if someone could help me out.

    Ty.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    I think the Application object has a property that will give you an array of all the opened windows. You could probably compare against that?

    Comment

    • fadah
      New Member
      • Mar 2008
      • 9

      #3
      Found that property and it worked.
      Thank You.

      Comment

      Working...