I have a winforms application where I want the close button in the top-right corner of the program to instead minimize the program.
I have been able to achieve this by using the form's FormClosing event like this:
this.Hide();
e.Cancel = true;
But this unfortunately also stops any other close buttons I place on the form.
Is there a way to only stop the default button in the top-right but still be able to close the form elsewhere?