1. frmHome frm = new frmHome();
frm.Show();
this.Close();
I\'m opening HomeForm
from LoginForm
. In LoginForm
Why don't you just stop calling application.exit in the form_closed event?
I am not sure that you really need it anyway, and if you do then you can remove the x icon from the screen and give them a close button.
Alternatively there is a CloseReason in the event args that will tell you if it is a user closing the form or code or something else.