this.Visible=false;
From2 f2=new From2();
f2.ShowDialog();
this.Visible=true;

解决方案 »

  1.   

    在父窗体中加入:
    <object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">   <param name="Command" value="Minimize"></object>  <script>
    function aaa()
    {
    window.open("http://www.csdn.net");
    hh1.Click();
    }
    </script>
     <input type=button value=csdn onclick=aaa()>
      

  2.   

    Form2 f = new Form2();
    this.Hide();
    f.ShowDialog();
    this.Show();
      

  3.   

    this.visible=false;
    form2.ShowDialog()
    this.Visible=true;
      

  4.   

    “父窗体Hide后再show子窗体”
    用这种方法有个缺陷,就是窗体会闪烁,影响界面