Maximum Login Attempts

Hi,
I've got a login form that authenticates a user against a database. I'm trying to implement a function whereby if a user enters 3 invalid passwords in succession, a message is displayed and the application shuts down. I'm using a for loop 2 achieve this, but i can't get it to work. Any suggestions for how i should implement this bit of functionality? Below is the login function for the form.

can you pls help me about this code i wrote an algorithm of 3 failed attempt but on c# visual studio it didnt work but i already tried it on java it works what was the problem in my code thnx for future :)

I'm not entirely believing this is for an actual production application, but if it is then you probably should realize you may not yet be qualified to code authentication mechanisms.

Lol. Hopefully there's no banking information to be found behind his authentication mechanism.

To make a truly secure mechanism (besides using an encrypted connection), use a stored procedure in your sql database that logs the users external IP address, and associate a count with that persons IP. This will circumvent any sort of brute-force techniques.

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...