how can i make my Form not to close but to Hide when user click on the “X” button on the form?
As i have a NotifyIcon that contain an Exit menu which actually does the Form Closing (i don’t want the Form’s “X” to close the form but to hide it).
thanks.
Just implement the FormClosing event. Cancel the close and hide the form unless it was triggered by the notify icon’s context menu. For example: