I've just registered and this being my first time on a forum like this, I am in need of some desperate help. I have written an assignment for my students but having no experience of using Delphi before I have had to spend hours learning how to use it. I do have relevant experience Pascal so it makes it easier.
The problem is that the program should ask the user for a password and if entered incorrectly three times, the "logon" button show be inactive forcing the user to close the program. If the user types in the correct password then a simple calculator should be displayed. I can do this but I cannot force the program to:-
1) Display the value for the number of attempts in a read only label
2) Force the program to make the "logon" button inactive after the user has typed an incorrect password three times.
I have displayed the code for the "logon" button below. Any help would be much appreciated! Thanks in advance!
[code]procedure Tnnn.btnlogonClick(Sender: TObject);
if edtpassword.Text = password then
MessageBox(0, 'Password Incorrect!','Integer Calculator', +mb_ICONINFORMATION);}
until (attempt<4) or (flag=true);
0 · ·