Hi everyone,
I'm making yet another program, and i am needing a login screen. The first form has 2 edit boxes and 2 buttons. The cancel button closes the program, the login button checks the username password if there correct or not. I have written the code for the login button but an error message keeps apearing every time I click the login button. The code that i have user is as follows:
begin
If edit1.Text='Admin' Then
Begin
Edit1.Readonly:=true;
end
else
If edit2.Text='1234' Then
Begin
form2.Visible:=True;
end
else
Begin
ShowMessage('Incorrect username and password');
end;
Could someone please help me out.