I have been trying to figure out, and search for how you can override the normal closing operation of a Form when a user hits the 'X' button, so that it just HIDES the form instead.
The closest I found in a forum someplace was they said to override OnClosing if you want to change how to handle the 'X' button default operations.
Like so:
protected override void OnClosing(CancelEventArgs e)
{
this.Hide();
}
However this does not work. The form is still disposed of, and when I try to show the form again I get an exception say just that.
Does anyone know how to do this, or can point me to an article or forum message someplace that explains this?
Thanks in advance...
Rodney