szułek [ Generaďż˝ ]
Delphi 7 mała poprawka...
Więc jest taka sytuacja mam już projekt. Chodzi o to aby Image1 który znajduje się na Sharpe1. Przesuwał się w górę lewo dół i prawo i żeby byla blokada. Czyli image1 nie może wyjechać po za sharpe1. No i mam już wstępny projekt lecz mam blokadę tylko na górę i lewo a prawo i dół normalnie wyjeżdża. Jeżeli ktoś wie to prosze o poprawkę:
Kod:
begin
Begin
if key=vk_left then
begin
if image1.left>Shape1.left+5 then
begin
image1.left:=image1.Left-5
end;
end;
Begin
if key=vk_right then
begin
if image1.left>Shape1.Width-5-Image1.Width then
begin
image1.left:=image1.Left+5
end;
end;
end;
begin
if key=vk_up then
begin
if image1.top>Shape1.top+5 then
begin
image1.top:=image1.top-5;
end;
end;
end;
Begin
if key=vk_down then
Begin
if image1.top>Shape1.width-5-Image1.width then
begin
image1.top:=image1.top+5;
end;
end;
end;
end;
end;
end.
szułek [ Generaďż˝ ]
up