Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need someone to test this for me.

Status
Not open for further replies.

Ante0

Programmer
Apr 19, 2007
98
SE
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
 
Works fine.

In edit1 I put '8'

In edit 2 I put '1860'

= 'Code Accepted!'

Anything else says 'wrong code'.
 
Nice, just what I needed :)
It's just a simple "shareware" message I'm making, but I needed it to work first, and I can't get ahold of my friend so he couldnt test it.
Thank you DomAntPallot :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top