hi everyone, how to close an application when the user fails to enter thro login after his 3rd attempt......
i.e my application should allow any user to login for maximum of 3 times if he is unable to enter the correct userid & pwd,then my application should close ......
Loading
Vimal KandasamyPosted Apr 23, 2009, 7:44 AM
Simply create a counter value..like
int ErrCount=0;
whenever login failed you increase it
and check whether it reach 3
if it reaches 3 then use
Application.Exit();
to terminate application.
mohanPosted Apr 23, 2009, 8:33 AM
could u give a try for my another post which is about datagridview......
hope u have already seen it.....
any how i am asking u once again......ie especially in winforms application........
Niradhip ChakrabortyPosted Apr 23, 2009, 7:43 AM
You can use the following code to close the application.
System.Windows.Forms.Application.Exit();