procedure TForm1.FormCreate(Sender: TObject);
begin
edit1.Text:=";
hata:=0;
assignfile(dsy,'c:\basri.dat');
{$i-}reset(dsy);{$i+}
if ioresult<>0 then rewrite(dsy);
for i:=0 to filesize(dsy)-1 do begin
seek(dsy,i);read(dsy,a);
if a.kilit='*'then begin
showmessage('kilitli');
halt;
end;
end;
end;
procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
if ord(key)=13 then begin
sifre:='basri';
if edit1.Text<>sifre then begin
hata:=hata+1;
edit1.Text:=";
end
else if edit1.Text=sifre then begin
form2.Show;
end;
if hata>=3 then begin
a.kilit:='*';
seek(dsy,filesize(dsy));write(dsy,a);
halt;
end;
end;
end;