Курсовая работа: Создание приложения Клавиатурный тренажер
x := 1;
Label1.Caption := 'Level ' + IntToStr(x);
Timer1.Enabled := true;
end;
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Panel2.Caption = key then
begin
Inc(count);
StatusBar1.Panels[1].Text := IntToStr(count);
Panel2.Top := Panel1.Height;
end;
if count = x * 10 then
begin
Inc(x);
Label1.Caption := 'Level ' + IntToStr(x);
if Timer1.Interval <= 250 then Timer1.Interval := Timer1.Interval - 25
else
if Timer1.Interval <= 100 then Timer1.Interval := 100
else
Timer1.Interval := Timer1.Interval - 250;
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Randomize;
if Panel1.Height > Panel2.Top then
Panel2.Top := Panel2.Top + 20
else