danke dafür, aber ich hab jetzt wieder ein problem.
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
var I: Integer;
J: Integer;
begin
for I := 1 to 13 do
begin
if (for J := 1 to 13 do
begin
(((FindComponent('Image' + IntToStr(J)) as TImage).Left) >= ((FindComponent('Image' + IntToStr(I)) as TImage).Left + 8))
end;) then ((FindComponent('Image' + IntToStr(I)) as TImage).Left) := (FindComponent('Image' + IntToStr(I)) as TImage).Left
else if ((FindComponent('Image' + IntToStr(I)) as TImage).Top = 96) and ((FindComponent('Image' + IntToStr(I)) as TImage).Left = 8) then
(FindComponent('Image' + IntToStr(I)) as TImage).Top := 48
else
if ((FindComponent('Image' + IntToStr(I)) as TImage).Top = 48) and ((FindComponent('Image' + IntToStr(I)) as TImage).Left = 536) then
(FindComponent('Image' + IntToStr(I)) as TImage).Top := 96
else
if ((FindComponent('Image' + IntToStr(I)) as TImage).Top = 96) and ((FindComponent('Image' + IntToStr(I)) as TImage).Left = 536) then
(FindComponent('Image' + IntToStr(I)) as TImage).Top := 144
else
if ((FindComponent('Image' + IntToStr(I)) as TImage).Top = 144) and ((FindComponent('Image' + IntToStr(I)) as TImage).Left >= 9) then
(FindComponent('Image' + IntToStr(I)) as TImage).Left := (FindComponent('Image' + IntToStr(I)) as TImage).Left - 8
else
if ((FindComponent('Image' + IntToStr(I)) as TImage).Top = 144) and ((FindComponent('Image' + IntToStr(I)) as TImage).Left = 8) then
(FindComponent('Image' + IntToStr(I)) as TImage).Top := 96
else (FindComponent('Image' + IntToStr(I)) as TImage).Left := (FindComponent('Image' + IntToStr(I)) as TImage).Left + 8;
end;
end;
beim end fon der forschleife(die mit J), komm der error:
Statement expected, but expression of 'Boolean' found.
was muss ich ändern?