hello friends,
i have very little bit Problem actually i just want to give only 3 a temps to user for login purpose... after that login form should be close... i have already right to code for user_id and Password but i don't have any idea how can i give 3 a temps to user for login.. if you have any idea or do u have any code then please let me know....
Thanks in Advance
Loading

Hirendra SisodiyaPosted Apr 12, 2010, 7:18 AM
i think it can be helpful for you,try this:
int i = 0;
// write code on login button click event:
if (i <= 3)
{
if (loginSuccess)
{
//run application
i = 0;
}
else
{
MessageBox.Show("Invalid user information");
i = i + 1;
}
}
else
{
MessageBox.Show("Attempt exceeded");
Application.Exit();
}
thanks
Please mark as answere if it helps