RT也就是说在B关闭前不能使用A

解决方案 »

  1.   

    例如在窗体A中的打开窗体B
    FormB formB = new FormB();
    formB.Show();
    formB.Owner = A;(formB.Owner = this;)
      

  2.   

    在Form1中写
    Form2 newfrm = new Form2();
    newfrm.ShowDialog();
      

  3.   

    用Owner 还是可以对原窗口进行操作
      

  4.   

    FormB formB = new FormB();
    formB.Show();
    formB.Owner = this;
    this.Enabled=true;在FromB的Dispose()方法中添加代码
    if(this.Owner!=null)
    {

    this.Owner.Enabled =true;
    }