1 this.FormClosing += AFormClosing; 2 3 4 private void AFormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) 5 { 6 if (e.CloseReason == CloseReason.UserClosing) 7 { 8 e.Cancel = true; 9 Hide(); 10 } 11 }
When you want to see the hide form.
newForm.Show();
newForm.Visible=true;