öhm, sorry, falsch rum gedacht^^
Delphi-Quellcode:
If (Key = VK_DOWN) and (Schlaeger2.Top < (Panel.Height - Schlaeger2.Height)) then //Pfeiltaste nach unten
begin
Schlaeger2.Top :=Schlaeger2.top + 20;
end
else if (Key = VK_UP) and (Schlaeger2.Top > 0) then //Pfeiltraste nach oben
begin
Schlaeger2.Top := Schlaeger2.Top - 20;
end
// --- Steuerung Schläger 1
else if (Key = 65) and (Schlaeger1.Top < (Panel.Height - Schlaeger1.Height)) then //A Taste
begin
Schlaeger1.Top := Schlaeger1.Top + 20;
end
else if (Key = 81) and (Schlaeger1.Top > 0) then //Q Taste
Schlaeger1.Top := Schlaeger1.Top - 20;
end;