Thanks to everyone who takes effort on answering my question.
I'm using WinForms C#, and on the MainForm_Load, I'm calling the Login form for the user. The Login form contains the X button (the default button on the top-right) and Loginbutton.
Now...
If the user decides to click on the X button the Login form closes and so should the MainForm, which I know how to do. But... if the user clicks on LoginButton the LoginForm should close, but the MainForm should stay opened.
Any idea hwo to do that ?