Friday, September 14, 2007

How to hide a form instead of closing it - with C# .Net

http://geekswithblogs.net/TimH/archive/2007/09/13/115323.aspx



// Use this event handler for the FormClosing event.

private void MyForm_FormClosing(object sender, FormClosingEventArgs e)
{
  this.Hide();
  e.Cancel = true; // this cancels the close event.
}

0 Comments:

Post a Comment

<< Home