Code:
...
var
UnlockKey: integer;
PassKey: integer;
...
procedure CheckKey;
begin
PassKey:= StrToInt(Edit1.Text);
UnlockKey:= ((((PassKey*2)+435)*4)+56);
if (Edit1.Text <> '') and (Edit2.text = IntToStr(UnlockKey)) then
begin
ShowMessage('Code Accepted!')
end
else
ShowMessage('Wrong code!')
end;
Could someone do me a favor and check if this code will work?
I won't be able to get to delphi for a week, and I need this to help a friend.
If it doesn't work, could you point out what I'm doing wrong?
Thanks, Ante0