When a user clicks the X button on a form, how can I hide it instead of closing it?
I have tried this.hide() in FormClosing but
this.hide()
FormClosing
From MSDN:
To cancel the closure of a form, set the Cancel property of the FormClosingEventArgs passed to your event handler to true.
Cancel
FormClosingEventArgs
true
So cancel then hide.