1. frmHome frm = new frmHome();
frm.Show();
this.Close();
I'm opening HomeForm from LoginForm. In LoginForm's form_closed event I call Application.Exit(). This allows you to open LoginForm and exit the application by clicking the X button.
The problem is when I move from LoginForm to HomeForm and call this.Close(), the form_closed event of LoginForm triggers and the application gets closed.
I am allowed to show only one form at a time. Please give me some suggestions to overcome this issue.
Many thanks in advance, Karthick