if (sUser = sDecryptU) and (sPass = sDecryptP) then
begin
frmRegularUser.Show;
frmLogin.Hide;
end
else
if (sUser = sDecryptMU) and (sPass = sDecryptMP) then
begin
frmAdmin.Show;
frmLogin.Hide;
end
else
begin
Inc(iCOunt);
ShowMessage('Username or Password incorrect / You have not entered your FullName');
Label1.Caption := IntToStr(iCount);
if iCount > iMAxAttemps then
begin
ShowMessage('');
btnLogin.Enabled := True;
end;
end;
end;
I tried to implement a counter that increments each time an incorrect password is entered.
I expected the counter to increase each time to then reach the max Attempts but it didn’t
New contributor
Fillip is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.