L
laohe
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key='Key_Left' then
panel1.Left:=panel1.Left+ 2
else if Key='Key_Right' then
panel1.Left:=panel1.Left- 2
else if Key='Key_Up' then
panel1.Top:=panel1.Top- 2
else if Key='Key_Down' then
panel1.Top:=panel1.Top+ 2 ;
end;
begin
if Key='Key_Left' then
panel1.Left:=panel1.Left+ 2
else if Key='Key_Right' then
panel1.Left:=panel1.Left- 2
else if Key='Key_Up' then
panel1.Top:=panel1.Top- 2
else if Key='Key_Down' then
panel1.Top:=panel1.Top+ 2 ;
end;