Forum: Multimedia
Delphi
by aurikel_Max,
3. Apr 2010
Entweder setzt du jetzt dein Shape ein Stück zurück oder du verhinderst einfach, dass beim Drücken der Pfeiltaste nach oben nichts mehr passiert:
procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case Key of
...
VK_UP: begin
IF not Shape1.top -5 = panel1.top then
shape1.Top := shape1.Top - 5;
Forum: Multimedia
Delphi
by aurikel_Max,
2. Apr 2010
Du kannst die Position deines Shapes abfragen und da Du auch weißt, wo die Wände sind .. :)
Hoffe, ich hab Dich richtig verstanden.