Hi,I have a problem and I couldn't solve it.please help me.
I have two windows form in C#,main form and userpassword form. at first I use main form, if user are using username and password,the main form calls userpassword form when user enters correct username and password, can use main form but when the user enter incorrect username and password, she /he can't use main form and now the user want to close the program but in this level user closes program with closeBox,but program opens main form.and it 's problem for me because user couldn't enter correct username and password but now she/he can use main form.
to solve this problem I used application.Exit(); in FormClosed event,my frist problem solved but after that I have another problem.because when I entered correct username and password , when userpassword form closed, all application closed because I use application.Exit(); in FormClosed event.
now what do you suggest to me?