if (EditEducationalLevel==null)
{}
else
{}

解决方案 »

  1.   

    对窗体类:
    Form2 Obj = new Form2();
    if (Obj.Created) {}对类:
    if (Obj.Equals(null)){}
      

  2.   

    建议使用showdialog,这样省去你检测窗口的麻烦。
      

  3.   

    业已搞定不知是否是笨了一点:
    int i=0;
    for ( ;i<this.MdiChildren.Length ;i++)
    {
    if (  this.MdiChildren[i]  is  SetEducationalLevel)
     {
       /*如查存在就设为活动窗口,显示*/
       break;
     }}
    if (i>=i<this.MdiChildren.Length)
    {
      /*如果没有找到就生成一个*/
    }
      

  4.   

    每新建一个对象,就调用static AddRef()
    {
    nRef ++;
    }
    每释放一个对象,就调用
    static Release()
    {
    nRef --;
    }需要时
    if(nRef ==0 )
    {}
    else
    {}