你得在点击时,捕获windows的消息,然后重写WndProc函数,当是关闭窗口消息时,弹出新窗口

解决方案 »

  1.   

    protected override void OnClosing(CancelEventArgs e)
    {
    base.OnClosing (e);
    if( MessageBox.Show( "您确定要退出?", "操作提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2 ) == DialogResult.No )
    {
    e.Cancel = true;
    }
    }
      

  2.   

    OnClosing事件可以处理
    e.Cancel = true;//取消关闭窗口的事件
      

  3.   

    可以先SHOW一个窗体,然后在e.Cnacel = true;取消关闭,就可以了
      

  4.   

    窗体的OnClosing事件中e.Cancel = true;然后show出一个你要show的窗体
      

  5.   

    在form_closing()中写:
    e.Cancel = true;//不退出
    Form f=new form2();
    f.Show();
      

  6.   

    private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    {
    e.Cancel = true;//不退出
    Form f=new Form();
    f.Show(); }实现关闭Form1时候 Form1不关闭弹出Form  f