Einzelnen Beitrag anzeigen

Benutzerbild von qb-tim
qb-tim

Registriert seit: 3. Mär 2006
Ort: Deutschland
280 Beiträge
 
Delphi 6 Professional
 
#10

Re: Das gleiche Bild in 576 Images laden!

  Alt 22. Apr 2006, 17:01
Delphi-Quellcode:
procedure TForm1.FormActivate(Sender: TObject);
var a, x, y : Integer;
    Bild : array [1..4, 1..12, 1..12] of TImage;
begin
  for a := 1 to 4 do
    for x := 1 to 12 do
      for y := 1 to 12 do
      begin
        Bild[a, x, y] := TImage.Create(Self);
        Bild[a, x, y].Height := 15;
        Bild[a, x, y].Width := 15;
        if a = 1 then
        begin
          Bild[a, x, y].Top := y * 15 + 1;
          Bild[a, x, y].Left := x * 15 + 1;
        end;
        if a = 2 then
        begin
          Bild[a, x, y].Top := y * 15 + 1 + 195;
          Bild[a, x, y].Left := x * 15 + 1;
        end;
        if a = 3 then
        begin
          Bild[a, x, y].Top := y * 15 + 1;
          Bild[a, x, y].Left := x * 15 + 1 + 195;
        end;
        if a = 4 then
        begin
          Bild[a, x, y].Top := y * 15 + 1 + 195;
          Bild[a, x, y].Left := x * 15 + 1 + 195;
        end;
      end;
  Bild[1, 1, 1].Picture.LoadFromFile('C:\Program Files\Borland\Delphi6\Projects\MazeMaker\images\none.bmp');
  for a := 2 to 4 do
    for x := 1 to 12 do
      for y := 1 to 12 do
        Bild[a, x, y].Picture.Assign(Bild[1, 1, 1].Picture);
  a := 1;
  for x := 2 to 12 do
    for y := 1 to 12 do
      Bild[a, x, y].Picture.Assign(Bild[1, 1, 1].Picture);
  x := 1;
  for y := 2 to 12 do
    Bild[a, x, y].Picture.Assign(Bild[1, 1, 1].Picture);
end;
Hm

Ich sehe da gar keine Bilder!



Was ist da falsch?
  Mit Zitat antworten Zitat